Skip to content

Commit b0c5368

Browse files
committed
Small improvements to HC-128 documentation
1 parent 918d481 commit b0c5368

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/prng/hc128.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
3+
// https://www.rust-lang.org/COPYRIGHT.
44
//
55
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

@@ -19,21 +19,21 @@ use impls;
1919
/// A cryptographically secure random number generator that uses the HC-128
2020
/// algorithm.
2121
///
22-
/// HC-128 is a stream cipher designed by Hongjun Wu[1], that we use as an RNG.
22+
/// HC-128 is a stream cipher designed by Hongjun Wu [1], that we use as an RNG.
2323
/// It is selected as one of the "stream ciphers suitable for widespread
24-
/// adoption" by eSTREAM[2].
24+
/// adoption" by eSTREAM [2].
2525
///
2626
/// HC-128 is an array based RNG. In this it is similar to RC-4 and ISAAC before
2727
/// it, but those have never been proven cryptographically secure (or have even
28-
/// been broken).
28+
/// been sgnificantly coompromised, as in the case of RC-4 [5]).
2929
///
3030
/// Because HC-128 works with simple indexing into a large array and with a few
3131
/// operations that parallelize well, it has very good performance. The size of
3232
/// the array it needs, 4kb, can however be a disadvantage.
3333
///
3434
/// This implementation is not based on the version of HC-128 submitted to the
3535
/// eSTREAM contest, but on a later version by the author with a few small
36-
/// improvements from December 15, 2009[3].
36+
/// improvements from December 15, 2009 [3].
3737
///
3838
/// HC-128 has no known weaknesses that are easier to exploit than doing a
3939
/// brute-force search of 2<sup>128</sup>. A very comprehensive analysis of the
@@ -48,11 +48,15 @@ use impls;
4848
/// (http://www.ecrypt.eu.org/stream/)
4949
///
5050
/// [3]: Hongjun Wu, [Stream Ciphers HC-128 and HC-256]
51-
/// (http://www3.ntu.edu.sg/home/wuhj/research/hc/index.html)
51+
/// (https://www.ntu.edu.sg/home/wuhj/research/hc/index.html)
5252
///
5353
/// [4]: Shashwat Raizada (January 2015),
5454
/// ["Some Results On Analysis And Implementation Of HC-128 Stream Cipher"]
5555
/// (http://library.isical.ac.in:8080/jspui/bitstream/123456789/6636/1/TH431.pdf).
56+
///
57+
/// [5]: Internet Engineering Task Force (Februari 2015),
58+
/// ["Prohibiting RC4 Cipher Suites"]
59+
/// (https://tools.ietf.org/html/rfc7465).
5660
#[derive(Clone)]
5761
pub struct Hc128Rng {
5862
state: Hc128,

0 commit comments

Comments
 (0)