bend-collections
Releases (1)
-
1.0.0.0 indexed
Definitions (4,483)
src/crypto/keccak/keccak.bend
- def pad7
- def pad6
- def pad5
- def pad4
- def pad3
- def pad2
- def pad1
- def pad0
- def finish
- def blocks
- def unchecked
- def digest
- def checked
- def sized
- def keccak256_rounds
- def keccak256
src/crypto/keccak/lane.bend
- def xor
- def chi
- def small
- def rotate_if
- def rotate
- def rol0Fixed rotations make constant shifts visible to the native compiler.
- def rol1
- def rol2
- def rol3
- def rol6
- def rol8
- def rol10
- def rol14
- def rol15
- def rol18
- def rol20
- def rol21
- def rol25
- def rol27
- def rol28
- def rol36
- def rol39
- def rol41
- def rol43
- def rol44
- def rol45
- def rol55
- def rol56
- def rol61
- def rol62
src/crypto/keccak/permutation.bend
src/crypto/keccak/types.bend
src/crypto/kex.bend
- type Keypair
- def keypair_of
- def generate_keypair
- def word_bytes32 bytes from 8 words, little-endian
- def random_bytes
- def generate_keypair_os
- def nonzero
- def shared_of
- def shared_secret
src/crypto/mac.bend
- def block_len
- def fitsWhether a key fits in the block, looking at no more than 65 of its bytes (the length of a long key is never computed).
- def block_key_if
- def block_keyThe key as it enters the block: itself, or its digest when too long.
- def maskThe n-byte block (key zero-padded to n bytes) XOR the pad byte, in one pass: past the end of the key a byte is 0 XOR pad = pad.
- def sign
- def verifyThe tag is compared in constant time (subtle.eq: no early exit on the contents; only the lengths, which are public, are compared directly).
src/crypto/password.bend
- type Params
- def owasp
- def rfc9106
- def len
- def encode
- def hash_passwordThe PHC string of Argon2id(pw, salt) with the parameters, or None when they are out of the RFC 9106 ranges (or m > 2^23 KiB, this implementation's limit).
- def verify_tag
- def verify_phc
- def verify_parsed
- def verify_passwordThe password matches the encoded Argon2id hash.
- def same
- def rehash_parsed
- def needs_rehashThe encoded hash should be recomputed: it is not an Argon2id v=19 PHC string with exactly these memory, passes, lanes, tag and salt lengths.
- def random_bytesn bytes from the operating system's generator.
- def salt_len
- def hash_password_oshash_password with a fresh salt of params' salt length from IO.random_u32.
src/crypto/poly1305/limbs.bend
- def hd0The first limb (0 for the empty list) and the rest.
- def tl
- def addLimb-wise sum (the shorter list is padded with zeros), no carries.
- def scaleEvery limb times c, no carries.
- def mulSchoolbook product, no carries: x r0 + 2^8 (x r1 + 2^8 (...)).
- def take
- def skip
- def fitThe first n limbs, padded with zeros to exactly n.
- def fold2^136 = 64 p + 320: limbs 17..
- def carryA carry pass over n limbs, each kept to 8 bits; the carry u and all limbs from n on (one, on the Poly1305 path) are summed into the top limb.
- def splitLimb n (the top one) reduced to its low 2 bits, i.e.
- def quot
- def reducePartial reduction of 17 limbs: carry, then 2^130 q = p q + 5 q, so q is folded back as 5 q on limb 0 and carried again.
- def blockOne Poly1305 block: h = (h + c) r, partially reduced mod p.