The HC-128 algorithm is a software-efficient (profile 1), synchronous stream cipher designed by Hongjun Wu. The cipher makes use of a 128-bit key and 128-bit initialisation vector; its secret state consists of two tables, each with 512 registers of 32 bits in length. At each step, one register of one of the tables is updated using a non-linear feedback function, while one 32-bit output is generated from the non-linear output filtering function. The cipher specification states that 264 keystream bits can be generated from each key/IV pair.

The HC-128 stream cipher offers a very impressive performance in software applications where one wishes to encrypt large streams of data. For example, it can encrypt at the speed of 3.52 cycles/byte on Pentium M processors, or 2.86 cycles/byte on AMD Athlon 64 processors. However, since HC-128 is a table-driven algorithm, there is a cost in the time to initialise the cipher (key and IV setup requires around 27,300 clock cycles). As a result, for applications that require frequent reinitialisation, there can be a significant performance penalty. This indicates that the HC-128 stream cipher should be a very strong performer for link-level streamed applications, but a relatively poor performer for typical packetised applications. For more information about eSTREAM ciphers performance in software, refer to the eSTREAM testing framework page.


Despite the design's high profile, there have been no significant cryptanalytic advances against HC-128 since the publication of the eSTREAM portfolio. Furthermore, there seems to be no indication that the security margin is at all tight.


HC-256 (article), a companion version to HC-128, with similar design, accommodates 256-bit keys. The designer states that HC-128 stream cipher is not covered by any patent and is freely available for any use (see statement). The cipher is also included in the latest release version of CyaSSL, a lightweight, open source embedded implementation of the SSL/TLS protocol.


  • The Stream Cipher HC-128: article
  • C source: zip
  • API-compliant C code: link
  • HC-128 original eSTREAM process page
  • Software Performance: link
  • Software Implementation: link
XHTML 1.0  |  CSS
Last updated in March 2012. The webmaster can be contacted by email at estream@ecrypt.eu.org