~/bend-docscommunity

src/crypto/blake/blake2s/blake2s.bend checks

raw source on the hub · import 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/blake2s.bend as Blake2s

Generated by tools/generators/blake2s_gen.py; do not edit.

3 imports
import Base
import ./types.bend as T
import ./compress.bend as C

Definitions

def carry source · line 7 · raw

@c:Bool -> @hi:U32 -> U32

The 64-bit byte counter t is kept as two U32 halves (t0 low, t1 high).

def count_hi source · line 12 · raw

@+lo:U32 -> @hi:U32 -> @+n:U32 -> U32

def read15 source · line 15 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @w12:U32 -> @w13:U32 -> @w14:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read14 source · line 19 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @w12:U32 -> @w13:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read13 source · line 23 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @w12:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read12 source · line 27 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read11 source · line 31 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read10 source · line 35 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read9 source · line 39 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read8 source · line 43 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read7 source · line 47 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read6 source · line 51 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read5 source · line 55 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read4 source · line 59 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read3 source · line 63 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read2 source · line 67 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read1 source · line 71 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def read0 source · line 75 · raw

@+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def absorb source · line 79 · raw

@a:Array<U32> -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State)

def keep source · line 84 · raw

@n:Nat -> @+w:U32 -> U32

The final block keeps the bytes before the logical length and zeroes the rest. keep(n, w) keeps the low n bytes of w.

def pad_word source · line 92 · raw

@w:U32 -> @+pos:Nat -> @+remain:Nat -> U32

def pad15 source · line 95 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @w12:U32 -> @w13:U32 -> @w14:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad14 source · line 99 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @w12:U32 -> @w13:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad13 source · line 103 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @w12:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad12 source · line 107 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @w11:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad11 source · line 111 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @w10:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad10 source · line 115 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @w9:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad9 source · line 119 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @w8:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad8 source · line 123 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @w7:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad7 source · line 127 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @w6:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad6 source · line 131 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @w5:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad5 source · line 135 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @w4:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad4 source · line 139 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @w3:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad3 source · line 143 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @w2:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad2 source · line 147 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @w1:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad1 source · line 151 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @w0:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def pad0 source · line 155 · raw

@+remain:Nat -> @+index:U32 -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> @t0:U32 -> @t1:U32 -> @pair:Pair(Array<U32>, U32) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def finish source · line 159 · raw

@a:Array<U32> -> @+index:U32 -> @+t0:U32 -> @t1:U32 -> @+remain:Nat -> @h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def blocks source · line 163 · raw

@n:Nat -> @+index:U32 -> @+t0:U32 -> @t1:U32 -> @+remain:Nat -> @pair:Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State) -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def initial source · line 172 · raw

0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

Parameter block for an unkeyed 32-byte digest: h0 = IV0 ^ 0x01010020.

def leading source · line 176 · raw

@length:Nat -> Nat

Blocks before the last one: max(1, ceil(length/64)) - 1.

def unchecked source · line 179 · raw

@a:Array<U32> -> @+length:Nat -> 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State

def digest source · line 183 · raw

@h:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/blake/blake2s/types.State -> Array<U32>

def checked source · line 197 · raw

@valid:Bool -> @a:Array<U32> -> @length:Nat -> Maybe<&1, Array<U32>>

def sized source · line 202 · raw

@+length:Nat -> @pair:Pair(Array<U32>, U32) -> Maybe<&1, Array<U32>>

def blake2s source · line 209 · raw

@a:Array<U32> -> @length:Nat -> Maybe<&1, Array<U32>>

BLAKE2s-256 of the first length bytes of a (four little-endian bytes per word): the eight little-endian digest words, or None when length exceeds 4 * the array capacity.