abla/ct

Generated from source.

Import with import "abla/ct".

Source: abla/ct/entry.ab

ablaCtNarrowTarget (extern)

noescape extern:"intrinsic" fun ablaCtNarrowTarget(): bool

Returns true when the target needs narrow-word lowering for secret 64-bit arithmetic.

ctJoin (fun)

@inline fun ctJoin(low: u32, high: u32): secretU64

Combines the upper and lower 32-bit words and returns a secret 64-bit value.

ctAddHalves (fun)

@inline fun ctAddHalves(aLow: u32, aHigh: u32, bLow: u32, bHigh: u32): secretU64

Returns the wrapping sum of two 64-bit values assembled from low and high words.

ctSubHalves (fun)

@inline fun ctSubHalves(aLow: u32, aHigh: u32, bLow: u32, bHigh: u32): secretU64

Returns the wrapping difference of two 64-bit values assembled from low and high words.

ctBorrowHalves (fun)

@inline fun ctBorrowHalves(aLow: u32, aHigh: u32, bLow: u32, bHigh: u32): u32

All ones in a word if the first number is less than the second, else zero.

ablaCtSecret_u8 (extern)

noescape extern:"intrinsic" fun ablaCtSecret_u8(value: u8): secretU8

Returns a secret 8-bit word holding the same bit pattern.

ablaCtBits_u8 (extern)

noescape extern:"intrinsic" fun ablaCtBits_u8(value: secretU8): u8

Returns the 8-bit pattern as a public unsigned word, exposing its value.

secretU8 (fun)

@inline fun secretU8(value: u8): secretU8

value as a secret: the compiler no longer knows anything about it.

secretU8.declassify (extension fun)

@inline fun secretU8.declassify(): u8

The bits, as a public value. Branch on them or index with them only if they may be known.

secretU8.plus (extension fun)

@inline operator fun secretU8.plus(other: secretU8): secretU8

Returns the secret sum modulo 2^8.

secretU8.minus (extension fun)

@inline operator fun secretU8.minus(other: secretU8): secretU8

Returns the secret difference modulo 2^8.

secretU8.times (extension fun)

@inline operator fun secretU8.times(other: secretU8): secretU8

Returns the secret product modulo 2^8.

secretU8.and (extension fun)

@inline operator fun secretU8.and(other: secretU8): secretU8

Returns the bitwise AND as a secret word.

secretU8.or (extension fun)

@inline operator fun secretU8.or(other: secretU8): secretU8

Returns the bitwise inclusive OR as a secret word.

secretU8.xor (extension fun)

@inline operator fun secretU8.xor(other: secretU8): secretU8

Returns the bitwise XOR as a secret word.

secretU8.inv (extension fun)

@inline operator fun secretU8.inv(): secretU8

Returns the bitwise complement as a secret word.

secretU8.shl (extension fun)

@inline operator fun secretU8.shl(count: int): secretU8

A public count: the amount shifted isn't hidden.

secretU8.shr (extension fun)

@inline operator fun secretU8.shr(count: int): secretU8

Returns the logical right shift as a secret word, using a public shift count.

secretU8.rotl (extension fun)

@inline fun secretU8.rotl(count: int): secretU8

Returns the secret word rotated left by the public count modulo 8.

secretU8.rotr (extension fun)

@inline fun secretU8.rotr(count: int): secretU8

Returns the secret word rotated right by the public count modulo 8.

ctIsNonZero (fun)

@inline fun ctIsNonZero(value: secretU8): secretU8

All ones if value isn't zero, else zero.

ctIsZero (fun)

@inline fun ctIsZero(value: secretU8): secretU8

All ones if value is zero, else zero.

ctEq (fun)

@inline fun ctEq(a: secretU8, b: secretU8): secretU8

All ones if they are equal, else zero.

ctLt (fun)

@inline fun ctLt(a: secretU8, b: secretU8): secretU8

All ones if a is less than b, as unsigned, else zero.

ctFromLowBit (fun)

@inline fun ctFromLowBit(value: secretU8): secretU8

All ones if bit 0 of value is set, else zero.

ctSelect (fun)

@inline fun ctSelect(mask: secretU8, a: secretU8, b: secretU8): secretU8

a where mask has ones, b where it has zeros. The mask goes through the barrier again: this is the one pattern LLVM most wants to make a select.

ablaCtSecret_u16 (extern)

noescape extern:"intrinsic" fun ablaCtSecret_u16(value: u16): secretU16

Returns a secret 16-bit word holding the same bit pattern.

ablaCtBits_u16 (extern)

noescape extern:"intrinsic" fun ablaCtBits_u16(value: secretU16): u16

Returns the 16-bit pattern as a public unsigned word, exposing its value.

secretU16 (fun)

@inline fun secretU16(value: u16): secretU16

value as a secret: the compiler no longer knows anything about it.

secretU16.declassify (extension fun)

@inline fun secretU16.declassify(): u16

The bits, as a public value. Branch on them or index with them only if they may be known.

secretU16.plus (extension fun)

@inline operator fun secretU16.plus(other: secretU16): secretU16

Returns the secret sum modulo 2^16.

secretU16.minus (extension fun)

@inline operator fun secretU16.minus(other: secretU16): secretU16

Returns the secret difference modulo 2^16.

secretU16.times (extension fun)

@inline operator fun secretU16.times(other: secretU16): secretU16

Returns the secret product modulo 2^16.

secretU16.and (extension fun)

@inline operator fun secretU16.and(other: secretU16): secretU16

Returns the bitwise AND as a secret word.

secretU16.or (extension fun)

@inline operator fun secretU16.or(other: secretU16): secretU16

Returns the bitwise inclusive OR as a secret word.

secretU16.xor (extension fun)

@inline operator fun secretU16.xor(other: secretU16): secretU16

Returns the bitwise XOR as a secret word.

secretU16.inv (extension fun)

@inline operator fun secretU16.inv(): secretU16

Returns the bitwise complement as a secret word.

secretU16.shl (extension fun)

@inline operator fun secretU16.shl(count: int): secretU16

A public count: the amount shifted isn't hidden.

secretU16.shr (extension fun)

@inline operator fun secretU16.shr(count: int): secretU16

Returns the logical right shift as a secret word, using a public shift count.

secretU16.rotl (extension fun)

@inline fun secretU16.rotl(count: int): secretU16

Returns the secret word rotated left by the public count modulo 16.

secretU16.rotr (extension fun)

@inline fun secretU16.rotr(count: int): secretU16

Returns the secret word rotated right by the public count modulo 16.

ctIsNonZero (fun)

@inline fun ctIsNonZero(value: secretU16): secretU16

All ones if value isn't zero, else zero.

ctIsZero (fun)

@inline fun ctIsZero(value: secretU16): secretU16

All ones if value is zero, else zero.

ctEq (fun)

@inline fun ctEq(a: secretU16, b: secretU16): secretU16

All ones if they are equal, else zero.

ctLt (fun)

@inline fun ctLt(a: secretU16, b: secretU16): secretU16

All ones if a is less than b, as unsigned, else zero.

ctFromLowBit (fun)

@inline fun ctFromLowBit(value: secretU16): secretU16

All ones if bit 0 of value is set, else zero.

ctSelect (fun)

@inline fun ctSelect(mask: secretU16, a: secretU16, b: secretU16): secretU16

a where mask has ones, b where it has zeros. The mask goes through the barrier again: this is the one pattern LLVM most wants to make a select.

ablaCtSecret_u32 (extern)

noescape extern:"intrinsic" fun ablaCtSecret_u32(value: u32): secretU32

Returns a secret 32-bit word holding the same bit pattern.

ablaCtBits_u32 (extern)

noescape extern:"intrinsic" fun ablaCtBits_u32(value: secretU32): u32

Returns the 32-bit pattern as a public unsigned word, exposing its value.

secretU32 (fun)

@inline fun secretU32(value: u32): secretU32

value as a secret: the compiler no longer knows anything about it.

secretU32.declassify (extension fun)

@inline fun secretU32.declassify(): u32

The bits, as a public value. Branch on them or index with them only if they may be known.

secretU32.plus (extension fun)

@inline operator fun secretU32.plus(other: secretU32): secretU32

Returns the secret sum modulo 2^32.

secretU32.minus (extension fun)

@inline operator fun secretU32.minus(other: secretU32): secretU32

Returns the secret difference modulo 2^32.

secretU32.times (extension fun)

@inline operator fun secretU32.times(other: secretU32): secretU32

Returns the secret product modulo 2^32.

secretU32.and (extension fun)

@inline operator fun secretU32.and(other: secretU32): secretU32

Returns the bitwise AND as a secret word.

secretU32.or (extension fun)

@inline operator fun secretU32.or(other: secretU32): secretU32

Returns the bitwise inclusive OR as a secret word.

secretU32.xor (extension fun)

@inline operator fun secretU32.xor(other: secretU32): secretU32

Returns the bitwise XOR as a secret word.

secretU32.inv (extension fun)

@inline operator fun secretU32.inv(): secretU32

Returns the bitwise complement as a secret word.

secretU32.shl (extension fun)

@inline operator fun secretU32.shl(count: int): secretU32

A public count: the amount shifted isn't hidden.

secretU32.shr (extension fun)

@inline operator fun secretU32.shr(count: int): secretU32

Returns the logical right shift as a secret word, using a public shift count.

secretU32.rotl (extension fun)

@inline fun secretU32.rotl(count: int): secretU32

Returns the secret word rotated left by the public count modulo 32.

secretU32.rotr (extension fun)

@inline fun secretU32.rotr(count: int): secretU32

Returns the secret word rotated right by the public count modulo 32.

ctIsNonZero (fun)

@inline fun ctIsNonZero(value: secretU32): secretU32

All ones if value isn't zero, else zero.

ctIsZero (fun)

@inline fun ctIsZero(value: secretU32): secretU32

All ones if value is zero, else zero.

ctEq (fun)

@inline fun ctEq(a: secretU32, b: secretU32): secretU32

All ones if they are equal, else zero.

ctLt (fun)

@inline fun ctLt(a: secretU32, b: secretU32): secretU32

All ones if a is less than b, as unsigned, else zero.

ctFromLowBit (fun)

@inline fun ctFromLowBit(value: secretU32): secretU32

All ones if bit 0 of value is set, else zero.

ctSelect (fun)

@inline fun ctSelect(mask: secretU32, a: secretU32, b: secretU32): secretU32

a where mask has ones, b where it has zeros. The mask goes through the barrier again: this is the one pattern LLVM most wants to make a select.

ablaCtSecret_u64 (extern)

noescape extern:"intrinsic" fun ablaCtSecret_u64(value: u64): secretU64

Returns a secret 64-bit word holding the same bit pattern.

ablaCtBits_u64 (extern)

noescape extern:"intrinsic" fun ablaCtBits_u64(value: secretU64): u64

Returns the 64-bit pattern as a public unsigned word, exposing its value.

secretU64 (fun)

@inline fun secretU64(value: u64): secretU64

value as a secret: the compiler no longer knows anything about it.

secretU64.declassify (extension fun)

@inline fun secretU64.declassify(): u64

The bits, as a public value. Branch on them or index with them only if they may be known.

secretU64.plus (extension fun)

@inline operator fun secretU64.plus(other: secretU64): secretU64

Returns the secret sum modulo 2^64.

secretU64.minus (extension fun)

@inline operator fun secretU64.minus(other: secretU64): secretU64

Returns the secret difference modulo 2^64.

secretU64.times (extension fun)

@inline operator fun secretU64.times(other: secretU64): secretU64

Returns the secret product modulo 2^64.

secretU64.and (extension fun)

@inline operator fun secretU64.and(other: secretU64): secretU64

Returns the bitwise AND as a secret word.

secretU64.or (extension fun)

@inline operator fun secretU64.or(other: secretU64): secretU64

Returns the bitwise inclusive OR as a secret word.

secretU64.xor (extension fun)

@inline operator fun secretU64.xor(other: secretU64): secretU64

Returns the bitwise XOR as a secret word.

secretU64.inv (extension fun)

@inline operator fun secretU64.inv(): secretU64

Returns the bitwise complement as a secret word.

secretU64.shl (extension fun)

@inline operator fun secretU64.shl(count: int): secretU64

A public count: the amount shifted isn't hidden.

secretU64.shr (extension fun)

@inline operator fun secretU64.shr(count: int): secretU64

Returns the logical right shift as a secret word, using a public shift count.

secretU64.rotl (extension fun)

@inline fun secretU64.rotl(count: int): secretU64

Returns the secret word rotated left by the public count modulo 64.

secretU64.rotr (extension fun)

@inline fun secretU64.rotr(count: int): secretU64

Returns the secret word rotated right by the public count modulo 64.

ctIsNonZero (fun)

@inline fun ctIsNonZero(value: secretU64): secretU64

All ones if value isn't zero, else zero.

ctIsZero (fun)

@inline fun ctIsZero(value: secretU64): secretU64

All ones if value is zero, else zero.

ctEq (fun)

@inline fun ctEq(a: secretU64, b: secretU64): secretU64

All ones if they are equal, else zero.

ctLt (fun)

@inline fun ctLt(a: secretU64, b: secretU64): secretU64

All ones if a is less than b, as unsigned, else zero.

ctFromLowBit (fun)

@inline fun ctFromLowBit(value: secretU64): secretU64

All ones if bit 0 of value is set, else zero.

ctSelect (fun)

@inline fun ctSelect(mask: secretU64, a: secretU64, b: secretU64): secretU64

a where mask has ones, b where it has zeros. The mask goes through the barrier again: this is the one pattern LLVM most wants to make a select.

secretU32.widen (extension fun)

@inline fun secretU32.widen(): secretU64

Returns the secret 32-bit word zero-extended to 64 bits.

secretU64.low (extension fun)

@inline fun secretU64.low(): secretU32

Returns the low 32 bits as a secret word.

secretU64.high (extension fun)

@inline fun secretU64.high(): secretU32

Returns the high 32 bits as a secret word.

secretU8.widen (extension fun)

@inline fun secretU8.widen(): secretU32

Returns the secret byte zero-extended to 32 bits.

secretU32.lowU8 (extension fun)

@inline fun secretU32.lowU8(): secretU8

Returns the low byte as a secret word.

ctEquals (fun)

trusted fun ctEquals(left: string, right: string): bool

Whether two strings are equal, reading every byte. Their lengths aren't secret: different ones are unequal at once.

Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.