diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-05-29 23:30:35 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-05-29 23:30:35 +0000 |
| commit | 356e37cb9cceeca82df50ef99b68979eb3ff0136 (patch) | |
| tree | d1ae0748e0c73bc01c70a9f8874f448bda8b8891 /doc | |
| parent | c91a37b2b030a69ec62acde10d00ddcd703c792d (diff) | |
| download | skalibs-356e37cb9cceeca82df50ef99b68979eb3ff0136.tar.gz | |
Add crc32c. Prepare for 2.14.5.0
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/index.html | 4 | ||||
| -rw-r--r-- | doc/libstdcrypto/index.html | 82 | ||||
| -rw-r--r-- | doc/license.html | 2 | ||||
| -rw-r--r-- | doc/upgrade.html | 7 |
4 files changed, 45 insertions, 50 deletions
diff --git a/doc/index.html b/doc/index.html index c92183a..8887bc0 100644 --- a/doc/index.html +++ b/doc/index.html @@ -60,8 +60,8 @@ with a standard C development environment </li> <h3> Download </h3> <ul> - <li> The current released version of skalibs is <a href="skalibs-2.14.4.0.tar.gz">2.14.4.0</a>. -You can access its checksum <a href="skalibs-2.14.4.0.tar.gz.sha256">here</a>. </li> + <li> The current released version of skalibs is <a href="skalibs-2.14.5.0.tar.gz">2.14.5.0</a>. +You can access its checksum <a href="skalibs-2.14.5.0.tar.gz.sha256">here</a>. </li> <li> Alternatively, you can checkout a copy of the <a href="//git.skarnet.org/cgi-bin/cgit.cgi/skalibs/">skalibs git repository</a>: diff --git a/doc/libstdcrypto/index.html b/doc/libstdcrypto/index.html index 6bf6974..d7c2bc0 100644 --- a/doc/libstdcrypto/index.html +++ b/doc/libstdcrypto/index.html @@ -26,16 +26,16 @@ operations are provided: </p> <ul> - <li> rc4 </li> - <li> md5 </li> <li> sha1 </li> <li> sha256 </li> <li> sha512 </li> + <li> blake2s </li> + <li> crc32c </li> </ul> <p> - Please bear in mind that rc4 and md5 are broken, and that sha1 is about to be. -Do not use them in security-critical applications. + Please bear in mind that sha1 is practically broken. +Do not use it in security-critical applications. </p> <h2> Compiling </h2> @@ -51,49 +51,6 @@ Do not use them in security-critical applications. for the exact function prototypes. </p> -<h3> <a name="rc4" /> -RC4 </h3> - -<pre> - RC4Schedule ctx ; - unsigned char const *key ; - size_t keylen ; - unsigned char const *in ; - unsigned char *out ; - size_t len ; - - rc4_init(&ctx, key, keylen) ; - rc4(&ctx, in, out, len) ; -</pre> - -<ul> - <li> <tt>rc4_init()</tt> initializes a RC4Schedule structure with a key <em>key</em>, -of length <em>keylen</em>. It then computes and throws away the first <tt>RC4_THROWAWAY</tt> -bytes, usually 100 </li> - <li> <tt>rc4()</tt> encrypts <em>len</em> bytes of <em>in</em> with the RC4 flow, and -stores the results into <em>out</em> </li> -</ul> - -<h3> <a name="md5" /> -MD5 </h3> - -<pre> - MD5Schedule ctx ; - char const *message ; - size_t messagelen ; - char digest[16] ; - - md5_init(&ctx) ; - md5_update(&ctx, message, messagelen) ; - md5_final(&ctx, digest) ; -</pre> - -<ul> - <li> <tt>md5_init()</tt> prepares a MD5Schedule structure for computation </li> - <li> <tt>md5_update()</tt> adds <em>message</em> to the message to be digested </li> - <li> <tt>md5_final()</tt> computes the digest </li> -</ul> - <h3> <a name="sha1"></a> SHA1 </h3> @@ -154,5 +111,36 @@ SHA512 </h3> <li> <tt>sha512_final()</tt> computes the digest </li> </ul> +<h3> <a name="blake2s"></a> +blake2s </h3> + + Same scheme as with the other hashes. + +<pre> + blake2s_ctx ctx ; + char const *message ; + size_t messagelen ; + size_t outlen = 32 ; /* the user gives the length of the digest */ + char digest[outlen] ; + + blake2s_init(&ctx, outlen) ; + blake2s_update(&ctx, message, messagelen) ; + blake2s_final(&ctx, digest) ; +</pre> + +<h3> <a name="crc32c"></a> +crc32c </h3> + + This isn't a cryptography primitive, but just a function to compute +the Castagnoli version of a cyclic redundancy code. + +<pre> + uint32_t crc = 0 ; /* no need for context except that crc needs to be initialized to 0 */ + char const *message ; + size_t messagelen ; + + crc = crc32c(crc, message, messagelen) ; +</pre> + </body> </html> diff --git a/doc/license.html b/doc/license.html index e10a595..94fa9ba 100644 --- a/doc/license.html +++ b/doc/license.html @@ -74,7 +74,7 @@ color, or different text font. </li> <p> <em>I am aware that the previous restrictions sound completely ridiculous while the official skalibs documentation is incomplete. -As of 2.14.4.0, I'm not going to enforce those restrictions, but if you're +As of 2.14.5.0, I'm not going to enforce those restrictions, but if you're going to provide documentation for skalibs, don't keep it to yourself, please send it to me instead. :-) </em> </p> diff --git a/doc/upgrade.html b/doc/upgrade.html index e6763d2..3903acc 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -16,6 +16,13 @@ <a href="//skarnet.org/">skarnet.org</a> </p> +<h2> in 2.14.5.0 </h2> + +<ul> + <li> Support for shared libraries on MacOS. </li> + <li> New <tt>crc32c</tt> function. </li> +</ul> + <h2> in 2.14.4.0 </h2> <ul> |
