~/bend-docscommunity

sha3.bend checks

raw source on the hub · import 0xfcfaebefd5553d7c2403dcd5c4130b80/sha3.bend as Sha3

2 imports
import Base
import ./internal/core.bend as C

Definitions

def Keccak.zero source · line 7 · raw

List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.xor5 source · line 10 · raw

@a:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @b:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @c:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @d:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @e:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def Keccak.columns source · line 13 · raw

@+s:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.ds source · line 22 · raw

@+c:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.rhopi source · line 31 · raw

@+s:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @+ds:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.chi_iota source · line 60 · raw

@+b:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @rc:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.round source · line 89 · raw

@+s:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @rc:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.rcs source · line 93 · raw

List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.permute.go source · line 96 · raw

@rcs:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @st:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.permute source · line 103 · raw

@st:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.xor_rate.go source · line 106 · raw

@n:Nat -> @state:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @words:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @acc:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.xor_rate source · line 115 · raw

@state:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @+block:List<&2, U32> -> @+lanes:Nat -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.absorb_blocks source · line 118 · raw

@n:Nat -> @+rate:Nat -> @+lanes:Nat -> @+xs:List<&2, U32> -> @state:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.pad.if source · line 126 · raw

@+rest:List<&2, U32> -> @+rem:U32 -> @+rate:U32 -> @domain:U32 -> @one:Bool -> List<&2, U32>

def Keccak.pad source · line 134 · raw

@+rest:List<&2, U32> -> @+rem:U32 -> @+rate:U32 -> @+domain:U32 -> List<&2, U32>

def Keccak.sponge source · line 137 · raw

@+xs:List<&2, U32> -> @+rate:U32 -> @+rate_n:Nat -> @+lanes:Nat -> @domain:U32 -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def Keccak.state_bytes.go source · line 146 · raw

@+state:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @n:Nat -> @+i:Nat -> List<&2, U32>

def Keccak.state_bytes source · line 153 · raw

@state:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @lanes:Nat -> List<&2, U32>

def Keccak.prepend_reverse source · line 159 · raw

@xs:List<&2, U32> -> @acc:List<&2, U32> -> List<&2, U32>

Prepend one normal-order byte block into an accumulator that stores the complete output in reverse order. The recursion is tail-recursive, so block assembly does not consume JavaScript call stack proportional to output size.

def Keccak.squeeze.go source · line 166 · raw

@n:Nat -> @+state:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @+lanes:Nat -> @rem:U32 -> @acc:List<&2, U32> -> List<&2, U32>

def Keccak.squeeze source · line 176 · raw

@+state:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @+out_len:U32 -> @+rate:U32 -> @+lanes:Nat -> List<&2, U32>

def SHA3_224.bytes source · line 183 · raw

@xs:List<&2, U32> -> List<&2, U32>

def SHA3_256.bytes source · line 186 · raw

@xs:List<&2, U32> -> List<&2, U32>

def SHA3_384.bytes source · line 189 · raw

@xs:List<&2, U32> -> List<&2, U32>

def SHA3_512.bytes source · line 192 · raw

@xs:List<&2, U32> -> List<&2, U32>

def SHA3_224.hex_bytes source · line 195 · raw

@xs:List<&2, U32> -> String

def SHA3_256.hex_bytes source · line 198 · raw

@xs:List<&2, U32> -> String

def SHA3_384.hex_bytes source · line 201 · raw

@xs:List<&2, U32> -> String

def SHA3_512.hex_bytes source · line 204 · raw

@xs:List<&2, U32> -> String

def SHA3_224.text source · line 207 · raw

@s:String -> String

def SHA3_256.text source · line 210 · raw

@s:String -> String

def SHA3_384.text source · line 213 · raw

@s:String -> String

def SHA3_512.text source · line 216 · raw

@s:String -> String

def SHAKE128.bytes source · line 220 · raw

@xs:List<&2, U32> -> @out_len:U32 -> List<&2, U32>

SHAKE XOF variants; out_len is in bytes.

def SHAKE256.bytes source · line 223 · raw

@xs:List<&2, U32> -> @out_len:U32 -> List<&2, U32>

def SHAKE128.hex_bytes source · line 226 · raw

@xs:List<&2, U32> -> @out_len:U32 -> String

def SHAKE256.hex_bytes source · line 229 · raw

@xs:List<&2, U32> -> @out_len:U32 -> String

def SHAKE128.text source · line 232 · raw

@s:String -> @out_len:U32 -> String

def SHAKE256.text source · line 235 · raw

@s:String -> @out_len:U32 -> String

def KECCAK_224.bytes source · line 245 · raw

@xs:List<&2, U32> -> List<&2, U32>

def KECCAK_256.bytes source · line 248 · raw

@xs:List<&2, U32> -> List<&2, U32>

def KECCAK_384.bytes source · line 251 · raw

@xs:List<&2, U32> -> List<&2, U32>

def KECCAK_512.bytes source · line 254 · raw

@xs:List<&2, U32> -> List<&2, U32>

def KECCAK_224.hex_bytes source · line 257 · raw

@xs:List<&2, U32> -> String

def KECCAK_256.hex_bytes source · line 260 · raw

@xs:List<&2, U32> -> String

def KECCAK_384.hex_bytes source · line 263 · raw

@xs:List<&2, U32> -> String

def KECCAK_512.hex_bytes source · line 266 · raw

@xs:List<&2, U32> -> String

def KECCAK_224.text source · line 269 · raw

@s:String -> String

def KECCAK_256.text source · line 272 · raw

@s:String -> String

def KECCAK_384.text source · line 275 · raw

@s:String -> String

def KECCAK_512.text source · line 278 · raw

@s:String -> String