bend-osdev-hashes
Releases (1)
-
0.1.0.0 indexed
Definitions (266)
check.bend
hashes.bend
- type HsErrorThe package's errors: a key of a length the algorithm does not take
- type HsMdStateThe engine's state (opaque): the chaining value, the bytes of the unfinished block (last first), how many there are, and the number of blocks compressed
- type HsW2Chaining values of two, four, five and eight 32-bit words (open types)
- type HsW4
- type HsW5
- type HsW8
- type HsW16The sixteen words of a 64-byte block (internal to the package)
- def hs.rotlx rotated left by n (1 to 31)
- def hs.lethe word with bytes a (least significant), b, c, d
- def hs.bethe word with bytes a (most significant), b, c, d
- def hs.block.leA block's sixteen words, little-endian (MD4, MD5, RIPEMD-160) or big-endian (SHA-1, SM3); a block of another length gives zeros (the engine passes only whole blocks)
- def hs.block.be
- def HsW2.le
- def HsW4.le
- def HsW5.le
- def HsW5.be
- def HsW8.be
- def HsMd.startthe state before any byte, from the initial chaining value
- def hs.md.push
- def hs.md.stepone byte in: a block of last + 1 bytes is compressed when it is full
- def hs.md.feed
- def HsMd.updatethe state after more bytes
- def HsMd.update_listthe same, for bytes as a list (each element is taken as it is: callers pass bytes)
- def HsMd.cvThe state's parts: the chaining value, the bytes of the unfinished block (first first), how many there are, and the number of blocks compressed
- def HsMd.pending
- def HsMd.count
- def HsMd.blocks
- def HsMd.bitsThe length so far in bits, modulo 2^64 (blocks of last + 1 bytes)
- def hs.len.leThe length field: eight bytes, little-endian (MD4, MD5, RIPEMD-160) or big-endian (SHA-1, SM3)
- def hs.len.be
- def HsMd.md_padThe Merkle-Damgard padding after cnt bytes of an unfinished block: the byte 0x80, zeros, then the length field, so that the whole is a number of blocks (the block size last + 1 a power of two)
- def HsMd.final_mdThe final step of a Merkle-Damgard hash: the padding with the length in bits (~field writes it: eight bytes, little- or big-endian), through the engine, then the digest of the chaining value (~out)
md4.bend
- def hs.md4.fthe round functions F (round 1), G (round 2) and H (round 3)
- def hs.md4.g
- def hs.md4.h
- def hs.md4.stepone step: (a + f + X[k] + K) <<< s
- def hs.md4.roundsBEGIN GENERATED by gen/rounds.py: md4
- def HsMd4.ivThe chaining value before any block (section 3.3)
- def HsMd4.compressOne 64-byte block (a list of another length is read as zero words: the engine passes only whole blocks)
- def HsMd4.init
- def HsMd4.update
- def HsMd4.finalthe digest of the bytes so far: the padding and the length, then the four words little-endian
- def HsMd4.digestThe digest in one call
md5.bend
- def hs.md5.fthe auxiliary functions F, G, H and I (section 3.4)
- def hs.md5.g
- def hs.md5.h
- def hs.md5.i
- def hs.md5.stepone step: b + ((a + f + X[k] + T[i]) <<< s)
- def hs.md5.roundsBEGIN GENERATED by gen/rounds.py: md5
- def HsMd5.ivThe chaining value before any block (section 3.3)
- def HsMd5.compressOne 64-byte block (a list of another length is read as zero words: the engine passes only whole blocks)
- def HsMd5.init
- def HsMd5.update
- def HsMd5.finalthe digest of the bytes so far: the padding and the length, then the four words little-endian
- def HsMd5.digestThe digest in one call
michael.bend
- def hs.michael.bthe block function b
- def hs.michael.word
- def HsMichael.compressOne four-byte word (any other length leaves the value unchanged)
- def hs.michael.keyThe key: eight bytes, as (K0, K1) (HsBadKeyLength otherwise)
- def HsMichael.key
- def HsMichael.initthe state before any byte, under a key
- def HsMichael.update
- def hs.michael.padthe padding after cnt bytes of an unfinished word: 0x5a, then four to seven zeros, to a whole number of words
- def HsMichael.finalthe tag of the bytes so far
- def HsMichael.micThe tag in one call
ripemd160.bend
- def hs.rmd.f1the functions f1 to f5 (the left line uses them in that order, the right line in the reverse order)
- def hs.rmd.f2
- def hs.rmd.f3
- def hs.rmd.f4
- def hs.rmd.f5
- def hs.rmd.stepone step: ((a + f + X[r] + K) <<< s) + e
- def hs.ripemd160.roundsBEGIN GENERATED by gen/rounds.py: ripemd160
- def HsRipemd160.ivThe chaining value before any block
- def HsRipemd160.compressOne 64-byte block (a list of another length is read as zero words: the engine passes only whole blocks)
- def HsRipemd160.init
- def HsRipemd160.update
- def HsRipemd160.finalthe digest of the bytes so far: MD4's padding, then the five words little-endian
- def HsRipemd160.digestThe digest in one call
sha1.bend
- def hs.sha1.chthe functions of section 4.1.1: Ch (steps 0 to 19), Parity (20 to 39 and 60 to 79), Maj (40 to 59)
- def hs.sha1.parity
- def hs.sha1.maj
- def hs.sha1.roundsBEGIN GENERATED by gen/rounds.py: sha1
- def HsSha1.ivThe chaining value before any block (section 5.3.1)
- def HsSha1.compressOne 64-byte block (a list of another length is read as zero words: the engine passes only whole blocks)
- def HsSha1.init
- def HsSha1.update
- def HsSha1.finalthe digest of the bytes so far: the padding of section 5.1.1, then the five words big-endian
- def HsSha1.digestThe digest in one call
sm3.bend
- def hs.sm3.p0the permutations P0 and P1
- def hs.sm3.p1
- def hs.sm3.ff0the boolean functions FF_j and GG_j: for rounds 0 to 15, and 16 to 63
- def hs.sm3.ff1
- def hs.sm3.gg0
- def hs.sm3.gg1
- def hs.sm3.roundsBEGIN GENERATED by gen/rounds.py: sm3
- def HsSm3.ivThe chaining value before any block (IV)
- def HsSm3.compressOne 64-byte block (a list of another length is read as zero words: the engine passes only whole blocks)