CVS commit: src/lib/libc/hash/sha2
Module Name:src Committed By: kamil Date: Tue Oct 9 11:36:35 UTC 2018 Modified Files: src/lib/libc/hash/sha2: sha2.3 Log Message: Drop Pad functions from sha2(3) This man-page first appeared before porting all the features to NetBSD and actually Pad ones were never ported. Keeping it in the documentation is misleading and actually caused bugs in handling of these functions in 3rd party software. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/hash/sha2/sha2.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/hash/sha2/sha2.3 diff -u src/lib/libc/hash/sha2/sha2.3:1.8 src/lib/libc/hash/sha2/sha2.3:1.9 --- src/lib/libc/hash/sha2/sha2.3:1.8 Mon Oct 30 15:44:29 2017 +++ src/lib/libc/hash/sha2/sha2.3 Tue Oct 9 11:36:35 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: sha2.3,v 1.8 2017/10/30 15:44:29 wiz Exp $ +.\" $NetBSD: sha2.3,v 1.9 2018/10/09 11:36:35 kamil Exp $ .\" $OpenBSD: sha2.3,v 1.11 2004/06/22 01:57:29 jfb Exp $ .\" .\" Copyright (c) 2003, 2004 Todd C. Miller @@ -21,13 +21,12 @@ .\" .\" See http://www.nist.gov/sha/ for the detailed standard .\" -.Dd May 20, 2009 +.Dd October 9, 2018 .Dt SHA2 3 .Os .Sh NAME .Nm SHA224_Init , .Nm SHA224_Update , -.Nm SHA224_Pad , .Nm SHA224_Final , .Nm SHA224_Transform , .Nm SHA224_End , @@ -36,7 +35,6 @@ .Nm SHA224_Data , .Nm SHA256_Init , .Nm SHA256_Update , -.Nm SHA256_Pad , .Nm SHA256_Final , .Nm SHA256_Transform , .Nm SHA256_End , @@ -45,7 +43,6 @@ .Nm SHA256_Data , .Nm SHA384_Init , .Nm SHA384_Update , -.Nm SHA384_Pad , .Nm SHA384_Final , .Nm SHA384_Transform , .Nm SHA384_End , @@ -54,7 +51,6 @@ .Nm SHA384_Data , .Nm SHA512_Init , .Nm SHA512_Update , -.Nm SHA512_Pad , .Nm SHA512_Final , .Nm SHA512_Transform , .Nm SHA512_End , @@ -70,8 +66,6 @@ .Ft void .Fn SHA224_Update "SHA224_CTX *context" "const uint8_t *data" "size_t len" .Ft void -.Fn SHA224_Pad "SHA224_CTX *context" -.Ft void .Fn SHA224_Final "uint8_t digest[SHA224_DIGEST_LENGTH]" "SHA224_CTX *context" .Ft void .Fn SHA224_Transform "uint32_t state[8]" "const uint8_t buffer[SHA224_BLOCK_LENGTH]" @@ -88,8 +82,6 @@ .Ft void .Fn SHA256_Update "SHA256_CTX *context" "const uint8_t *data" "size_t len" .Ft void -.Fn SHA256_Pad "SHA256_CTX *context" -.Ft void .Fn SHA256_Final "uint8_t digest[SHA256_DIGEST_LENGTH]" "SHA256_CTX *context" .Ft void .Fn SHA256_Transform "uint32_t state[8]" "const uint8_t buffer[SHA256_BLOCK_LENGTH]" @@ -106,8 +98,6 @@ .Ft void .Fn SHA384_Update "SHA384_CTX *context" "const uint8_t *data" "size_t len" .Ft void -.Fn SHA384_Pad "SHA384_CTX *context" -.Ft void .Fn SHA384_Final "uint8_t digest[SHA384_DIGEST_LENGTH]" "SHA384_CTX *context" .Ft void .Fn SHA384_Transform "uint64_t state[8]" "const uint8_t buffer[SHA384_BLOCK_LENGTH]" @@ -124,8 +114,6 @@ .Ft void .Fn SHA512_Update "SHA512_CTX *context" "const uint8_t *data" "size_t len" .Ft void -.Fn SHA512_Pad "SHA512_CTX *context" -.Ft void .Fn SHA512_Final "uint8_t digest[SHA512_DIGEST_LENGTH]" "SHA512_CTX *context" .Ft void .Fn SHA512_Transform "uint64_t state[8]" "const uint8_t buffer[SHA512_BLOCK_LENGTH]" @@ -179,13 +167,6 @@ and stores a message digest in the parameter. .Pp The -.Fn SHA256_Pad -function can be used to apply padding to the message digest as in -.Fn SHA256_Final , -but the current context can still be used with -.Fn SHA256_Update . -.Pp -The .Fn SHA256_Transform function is used by .Fn SHA256_Update
CVS commit: src/lib/libc/hash/sha2
Module Name:src Committed By: wiz Date: Mon Oct 30 15:44:29 UTC 2017 Modified Files: src/lib/libc/hash/sha2: sha2.3 Log Message: Remove Tn. Do not split on An lines. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/hash/sha2/sha2.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/hash/sha2/sha2.3 diff -u src/lib/libc/hash/sha2/sha2.3:1.7 src/lib/libc/hash/sha2/sha2.3:1.8 --- src/lib/libc/hash/sha2/sha2.3:1.7 Wed Oct 25 16:04:00 2017 +++ src/lib/libc/hash/sha2/sha2.3 Mon Oct 30 15:44:29 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sha2.3,v 1.7 2017/10/25 16:04:00 abhinav Exp $ +.\" $NetBSD: sha2.3,v 1.8 2017/10/30 15:44:29 wiz Exp $ .\" $OpenBSD: sha2.3,v 1.11 2004/06/22 01:57:29 jfb Exp $ .\" .\" Copyright (c) 2003, 2004 Todd C. Miller @@ -203,9 +203,8 @@ The .Fn SHA256_End function is a front end for .Fn SHA256_Final -which converts the digest into an -.Tn ASCII -representation of the digest in hexadecimal. +which converts the digest into an ASCII representation of the digest +in hexadecimal. .Pp The .Fn SHA256_File @@ -312,8 +311,9 @@ The SHA2 functions appeared in and .Nx 3.0 . .Sh AUTHORS +.An -nosplit This implementation of the SHA functions was written by -.An Aaron D. Gifford. +.An Aaron D. Gifford . .Pp The .Fn SHA256_End ,
CVS commit: src/lib/libc/hash/sha2
Module Name:src Committed By: abhinav Date: Wed Oct 25 16:04:00 UTC 2017 Modified Files: src/lib/libc/hash/sha2: sha2.3 Log Message: Add sha_224, sha_384 and sha_512 family of functions to the NAME section as well. Also use .An for authors in the AUTHORS section To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/hash/sha2/sha2.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/hash/sha2/sha2.3 diff -u src/lib/libc/hash/sha2/sha2.3:1.6 src/lib/libc/hash/sha2/sha2.3:1.7 --- src/lib/libc/hash/sha2/sha2.3:1.6 Mon Jul 3 21:32:49 2017 +++ src/lib/libc/hash/sha2/sha2.3 Wed Oct 25 16:04:00 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sha2.3,v 1.6 2017/07/03 21:32:49 wiz Exp $ +.\" $NetBSD: sha2.3,v 1.7 2017/10/25 16:04:00 abhinav Exp $ .\" $OpenBSD: sha2.3,v 1.11 2004/06/22 01:57:29 jfb Exp $ .\" .\" Copyright (c) 2003, 2004 Todd C. Miller @@ -25,6 +25,15 @@ .Dt SHA2 3 .Os .Sh NAME +.Nm SHA224_Init , +.Nm SHA224_Update , +.Nm SHA224_Pad , +.Nm SHA224_Final , +.Nm SHA224_Transform , +.Nm SHA224_End , +.Nm SHA224_File , +.Nm SHA224_FileChunk , +.Nm SHA224_Data , .Nm SHA256_Init , .Nm SHA256_Update , .Nm SHA256_Pad , @@ -33,7 +42,25 @@ .Nm SHA256_End , .Nm SHA256_File , .Nm SHA256_FileChunk , -.Nm SHA256_Data +.Nm SHA256_Data , +.Nm SHA384_Init , +.Nm SHA384_Update , +.Nm SHA384_Pad , +.Nm SHA384_Final , +.Nm SHA384_Transform , +.Nm SHA384_End , +.Nm SHA384_File , +.Nm SHA384_FileChunk , +.Nm SHA384_Data , +.Nm SHA512_Init , +.Nm SHA512_Update , +.Nm SHA512_Pad , +.Nm SHA512_Final , +.Nm SHA512_Transform , +.Nm SHA512_End , +.Nm SHA512_File , +.Nm SHA512_FileChunk , +.Nm SHA512_Data .Nd calculate the NIST Secure Hash Standard (version 2) .Sh SYNOPSIS .In sys/types.h @@ -285,7 +312,8 @@ The SHA2 functions appeared in and .Nx 3.0 . .Sh AUTHORS -This implementation of the SHA functions was written by Aaron D. Gifford. +This implementation of the SHA functions was written by +.An Aaron D. Gifford. .Pp The .Fn SHA256_End , @@ -293,7 +321,8 @@ The .Fn SHA256_FileChunk , and .Fn SHA256_Data -helper functions are derived from code written by Poul-Henning Kamp. +helper functions are derived from code written by +.An Poul-Henning Kamp . .Sh CAVEATS This implementation of the Secure Hash Standard has not been validated by NIST and as such is not in official compliance with the standard.
CVS commit: src/lib/libc/hash/sha2
Module Name:src Committed By: riastradh Date: Thu Dec 11 21:54:13 UTC 2014 Modified Files: src/lib/libc/hash/sha2: sha224hl.c Log Message: Fix rcsid comment. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/hash/sha2/sha224hl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/hash/sha2/sha224hl.c diff -u src/lib/libc/hash/sha2/sha224hl.c:1.1 src/lib/libc/hash/sha2/sha224hl.c:1.2 --- src/lib/libc/hash/sha2/sha224hl.c:1.1 Tue May 26 08:04:12 2009 +++ src/lib/libc/hash/sha2/sha224hl.c Thu Dec 11 21:54:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD */ +/* $NetBSD: sha224hl.c,v 1.2 2014/12/11 21:54:13 riastradh Exp $ */ /* * Derived from code written by Jason R. Thorpe , @@ -7,7 +7,7 @@ */ #include -__RCSID("$NetBSD: sha224hl.c,v 1.1 2009/05/26 08:04:12 joerg Exp $"); +__RCSID("$NetBSD: sha224hl.c,v 1.2 2014/12/11 21:54:13 riastradh Exp $"); #define HASH_ALGORITHM SHA224 #define HASH_FNPREFIX SHA224_