file: job.t package: muf status: alpha
This function is based on the Secure Hash Function (SHA-1), as specified by international standard FIPS PUB 180-1: It mixes the information in the given block together to produce a twenty-byte signature, which is then appended to the block:
[ 'a' 'b' 'c' | Stack: [ 'a' 'b' 'c' | |secureHash Stack: [ 'a' 'b' 'c' '\251' '\231' '>' '6' 'G' '\006' '\201' 'j' '\272' '>' '%' 'q' 'x' 'P' '\302' 'l' '\234' '\320' '\330' '\235' |
One use is to append the signature to the block before transmitting it over an unreliable medium, and then to verify it at the other end: If any bytes have become accidentally garbled, it is extremely unlikely the signature will still match.
Another use is in authentication: If Alice and Bob share
a secret string, and Alice sends Bob message +
secureHash( message + secret )
, Bob can verify (with
very high probability) that whoever sent the message
must have known the secret, hence is probably Alice.
See section hash. See section |signedDigest. See section |signedDigestCheck. See section |secureHash. See section |secureHashCheck. See section secureHash. See section secureHashBinary. See section secureHashFixnum.
Go to the first, previous, next, last section, table of contents.