bend-osdev-legacy-ciphers
Releases (1)
-
0.1.0.0 indexed
Definitions (970)
legacy_ciphers.bend
- def lc.wrotlthe (m + n)-bit word w rotated left by n
- def lc.rotl1.bits
- def lc.rotl3.bits
- def lc.rotl5.bits
- def lc.rotl7.bits
- def lc.rotl10.bits
- def lc.rotl13.bits
- def lc.rotl19.bits
- def lc.rotl22.bits
- def lc.rotl25.bits
- def lc.rotl27.bits
- def lc.rotl29.bits
- def lc.rotl31.bits
- def lc.bits8the low 8 bits of a word, as bits, and the byte with these bits
- def lc.of8
- def lc.be.bitsthe word with bytes a (most significant), b, c, d, by bits
- def lc.b0.bitsthe bytes of w, by bits: b0 the most significant
- def lc.b1.bits
- def lc.b2.bits
- def lc.b3.bits
- def lc.bswap.bitsthe word with its bytes in reverse order (big-endian to little-endian)
- def lc.msb.gothe bits of a word, most significant first, in front of acc
- def lc.msb
- def lc.rev_bitsbs reversed, in front of acc
- def lc.drop_bitsall but the first n of bs
- def lc.word_lsbthe n-bit word whose bits, least significant first, are the first n of bs (False past the end)
- def lc.nththe element i of bs (False past the end)
- type LcTab
- def lc.tab.leaves
- def lc.tab.pairs
- def lc.tab.up
- def lc.tab.root
- def lc.tabthe table of the 2^d words xs (entry i is element i)
- def lc.tab.pick
- def lc.tab.getentry i of a table of depth d (i below 2^d)
- def lc.tab.paththe bits of i (below 2^d) that pick its entry, most significant first
- def lc.tab.set.go
- def lc.tab.setentry i of a table of depth d set to v (i below 2^d)
- def lc.fe.step
- def lc.fe.unstep
- def lc.fe.run
- def lc.fe.unrun
- def lc.swapthe two halves exchanged
- def lc.block_bytesthe 8 bytes of a block in front of rest
- def lc.block8
- def LcBlock64.to_octets
- def lc.block_of
- def LcBlock64.of_octetsan 8-byte string as a block (big-endian words); None for any other length
- def LcBlock64.hex
modes64.bend
- def m64.ecb
- def m64.cbc.encC_1 = E(P_1 xor IV), C_j = E(P_j xor C_(j-1))
- def m64.cbc.decP_1 = D(C_1) xor IV, P_j = D(C_j) xor C_(j-1)
- def m64.rev_onto
- def m64.ecb.go
- def m64.cbc.enc.go
- def m64.cbc.dec.go
- def Lc64.ecb_encrypt_blocks
- def Lc64.ecb_decrypt_blocks
- def Lc64.cbc_encrypt_blocks
- def Lc64.cbc_decrypt_blocks
- def m64.splitthe bytes as whole blocks (reversed onto acc), or None if bytes are left over
- def m64.jointhe bytes of the blocks (reversed) in front of acc
- def m64.octets
- def m64.blocks
- def Lc64.blocks_ofthe message as whole blocks, or LcNotBlockMultiple
- def Lc64.octets_ofthe blocks' bytes, in order
- def m64.iv
- def Lc64.ecb_encrypt
- def Lc64.ecb_decrypt
- def m64.cbc.e2
- def m64.cbc.e1
- def m64.cbc.d2
- def m64.cbc.d1
- def Lc64.cbc_encryptm (whole blocks) under the 8-byte iv
- def Lc64.cbc_decrypt
rc4.bend
- def rc4.paththe bits of i (below 2^d) that pick its entry, most significant first
- def rc4.get
- def rc4.set
- def rc4.at
- def rc4.swapS with entries i and j exchanged
- def rc4.identthe identity permutation 0 ..
- type LcRc4StateThe state (opaque): S, i and j
- def rc4.ksaThe key-scheduling algorithm: for i = 0 ..
- type LcRc4StepOne step of the output algorithm: the next state and keystream byte
- def rc4.nexti = i + 1; j = j + S[i]; swap S[i] and S[j]; the byte S[S[i] + S[j]]
- def rc4.step.st
- def rc4.step.k
- def rc4.xs
- def rc4.after
- type LcRc4OutA piece of data through the cipher: the state after it, and its bytes encrypted (or decrypted).
- def rc4.rev_onto
- type LcRc4Run
- def rc4.go
- def rc4.out
- def rc4.dropdrop n keystream bytes
- def rc4.start.pick
- def LcRc4.startthe state after the key-scheduling algorithm, for a key of 1 to 256 bytes
- def LcRc4.start_dropthe state after dropping the first n keystream bytes (RC4-drop[n]; RFC 4345 drops 1536 for SSH's arcfour128 and arcfour256)
- def LcRc4.updatethe next piece of data, encrypted or decrypted, and the state after it
- def LcRc4.out_state