abla/crypto/rsa/raw

Generated from source.

Source module; follow its importing module's re-export links.

Source: abla/crypto/rsa/raw.ab

rsaMultiplyPlain (fun)

trusted fun rsaMultiplyPlain(modulus: BnModulus, out: int, a: int, b: int): void

out = a * b mod the modulus, all in plain form.

rsaReduceWide (fun)

trusted fun rsaReduceWide(modulus: BnModulus, out: int, value: int): void

out = value, of 2 words limbs, mod the modulus: low + high 2^k, by multiplying each part.

rsaCrt (fun)

trusted fun rsaCrt(key: RsaPrivateKey, modulus: BnModulus, out: int, value: int): void

out = value ^ d mod n, by CRT with fixed-window exponents.

rsaModulusFromLimbs (fun)

trusted fun rsaModulusFromLimbs(limbs: int, words: int): BnModulus

Returns a bignum modulus from the specified readable limbs and clears the temporary byte encoding.

rsaImplicitLength (fun)

@inline trusted fun rsaImplicitLength(candidates: int, size: int): secretU32

Choose the last of 128 in-range lengths, without revealing which one qualified.

rsaImplicitSelect (fun)

@inline trusted fun rsaImplicitSelect(out: int, encoded: int, synthetic: int, size: int,
    syntheticLength: secretU32): secretU32

Read both complete blocks and select every byte before releasing the resulting length.

rsaOaepDelimiter (fun)

@inline trusted fun rsaOaepDelimiter(block: int, size: int, expected: int, hashSize: int,
    first: u8): secretU32

block is OAEP DB; expected is lHash. Inspect every byte before revealing validity.

rsaPkcs1Delimiter (fun)

@inline trusted fun rsaPkcs1Delimiter(address: int, size: int): secretU32

The delimiter and validity remain secret until the whole block has been inspected. A zero result means invalid; valid delimiters are at least byte 10.

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