bend-collections
Releases (1)
-
1.0.0.0 indexed
Definitions (4,483)
src/crypto/ed25519/ed25519.bend
- def prefix
- def public_ofxs: an input (the seed or the public key), which keeps the proof checker from computing the curve constants (see PT.lit)
- def public_keyA = [s]B, encoded
- def sign_with
- def sign_raw
- def check
- def verify_with
- def verify_raw
src/crypto/ed25519/point.bend
- type Pt
- type Csd = -121665 / 121666, 2 d, sqrt(-1) = 2^((p - 1) / 4)
- def c121665
- def c121666
- def pow_p142^((p - 1) / 4), (p - 1) / 4 = 2^253 - 5: 250 one bits, then 0 1 1
- def cs_d
- def cs_d2
- def cs_s
- def litk itself; taking an input list xs keeps the proof checker from computing with the constant k while xs is unknown (it would otherwise evaluate the whole field arithmetic on constants whenever it compares two terms)
- def cs_of
- def conststhe curve constants, computed (xs is any input, see lit)
- def identity
- def addRFC 8032 5.1.4, addition
- def doubleRFC 8032 5.1.4, doubling
- def selects == 0: p; s == 1: q
- def smul[bits t = n - 1 ..
- def mul[k] p for a byte-string scalar k
- def set_topthe last byte with bit 7 set to b (the canonical y has it clear)
- def encodeRFC 8032 5.1.2
- def ge_py >= p: the carry of y + 2^256 - p is not 0
- def dec_fin
- def dec_root
- def dec_y
- def decodeRFC 8032 5.1.3 on 32 bytes below 256
- def equalthe same point: X1 Z2 == X2 Z1 and Y1 Z2 == Y2 Z1
- def base_ofthe base point: y = 4 / 5, x even
- def base
src/crypto/ed25519/scalar.bend
- def ellL, little-endian bytes
- def comp_l2^256 - L
- def csubx - L when x >= L, else x (x tight, x < 2 L)
- def addm
- def macbits t = n - 1 down to 0 of bs: acc = 2 acc + bit s (mod L)
- def reduce
- def mul_add
- def lt_lx < L: the carry of x + 2^256 - L is 0
src/crypto/hash.bend
- type Sha256StateA chaining state and the buffered bytes of the unfinished block.
- type Sha512State
- type Sha3State
- type Hasher
- def sha256SHA-256 (FIPS 180-4), 32 bytes.
- def sha512SHA-512 (FIPS 180-4), 64 bytes.
- def sha3_256SHA3-256 (FIPS 202), 32 bytes.
- type Read256One block read 4 bytes at a time into its 16 words, or Short when fewer than 64 bytes are left.
- def read256_16
- def read256_15
- def read256_14
- def read256_13
- def read256_12
- def read256_11
- def read256_10
- def read256_9
- def read256_8
- def read256_7
- def read256_6
- def read256_5
- def read256_4
- def read256_3
- def read256_2
- def read256_1
- def read256_0
- def absorb256Compress every whole block (fuel bounds the count: any fuel >= the number of blocks reads them all; fewer leaves the rest buffered, still correct).
- def step256
- def finish256
- type Read512One block read 8 bytes at a time into its 16 words, or Short when fewer than 128 bytes are left.
- def read512_16
- def read512_15
- def read512_14
- def read512_13
- def read512_12
- def read512_11
- def read512_10
- def read512_9
- def read512_8
- def read512_7
- def read512_6
- def read512_5
- def read512_4
- def read512_3
- def read512_2
- def read512_1
- def read512_0
- def absorb512Compress every whole block (fuel bounds the count: any fuel >= the number of blocks reads them all; fewer leaves the rest buffered, still correct).
- def step512
- def finish512
- type Read3One block read 8 bytes at a time into its 17 words, or Short when fewer than 136 bytes are left.
- def read3_17
- def read3_16
- def read3_15
- def read3_14
- def read3_13
- def read3_12
- def read3_11