3f: Scrambling

+un

Reversible scrambling.

A core that contains arms that perform reversible scrambling operations. Used in the @p phonetic base.

Source

++  un
  |%

+wren:un

Conceal structure.

Scrambles a byte-string .pyn by adding the current position to each byte, looking it up in an s-box, and then performing the XOR operation on the result, pushing it forward. The inverse of +wred.

Accepts

.pyn is an $atom.

Produces

An $atom.

Source

Examples


+wred:un

Restore structure.

Unscrambles a byte-string .cry by subtracting the current position from each byte, looking it up in an s-box, and performing the XOR operation on the result, pushing it forward. The inverse of +wren.

Accepts

.cry is an $atom.

Produces

An $atom.

Source

Examples


+xafo:un

Add modulo 255.

Produces the sum of two $atoms modulo 255, encoded as a nonzero byte. The inverse of +xaro.

Accepts

.a is an $atom.

.b is an $atom.

Produces

An $atom.

Source

Examples


+xaro:un

Subtract modulo 255.

Produces the sum of two $atoms modulo 255, encoded as a nonzero byte. The inverse of +xafo.

Accepts

.a is an $atom.

.b is an $atom.

Produces

An $atom.

Source

Examples


+zaft:un

Look up in 255 sub box.

Looks up a nonzero byte .a in a substitution box with 255 values, producing a unique nonzero byte. The inverse of +zart.

Accepts

.a is an $atom of one byte in length.

Produces

An $atom.

Source

Examples


+zart:un

Reverse look up in 255 sub box.

Looks up the index of a nonzero byte .a in the substitution box with 255 values, producing a unique nonzero byte. The inverse of +zaft.

Accepts

.a is an $atom of one byte in length.

Produces

An $atom.

Source

Examples


+zyft:un

Lookup byte in 256 sub box.

Looks up a byte .a in a substitution box with 256 values, producing a byte. The inverse of +zyrt.

Accepts

.a is an $atom of one byte in length.

Produces

An $atom.

Source

Examples


+zyrt:un

Reverse lookup byte in 256 sub box.

Looks up a byte .a in a substitution box with 256 values, producing a byte. The inverse of +zyft.

Accepts

.a is an $atom of one byte in length.

Produces

An $atom.

Source

Examples


+ob

Reversible scrambling, v3.

A core for performing reversible scrambling operations for the @p phonetic base.

Source


+fein:ob

Conceal structure, v3.

+fein conceals planet-sized $atoms. The idea is that it should not be trivial to tell which planet a star has spawned under.

Permutes $atom .pyn which fits into 17 to 32 bits, or if .pyn fits into 33 to 64 bits, does the same permutation on the low 32 bits only. Otherwise, passes .pyn through unchanged.

Accepts

.pyn is an $atom.

Produces

An $atom.

Source

Examples


+fynd:ob

Restore structure, v3.

Restores obfuscated values that have been enciphered with +fein.

Permutes $atom .cry that fits into 17 to 32 bits, or permutes the low 32 bits of .cry if it fits into 33 to 64 bits. Otherwise, passes the $atom through unchanged. The inverse of the one applied by +fein.

Accepts

.cry is an $atom.

Produces

An $atom.

Source

Examples


+feis:ob

Four-round generalised Feistel cipher over the domain [0, 2^32 - 2^16 - 1].

See: Black & Rogaway (2002), Ciphers for arbitrary finite domains.

Inverse of +tail.

Accepts

.m is an $atom.

Produces

An $atom.

Source

Examples


+tail:ob

Reverse +feis.

Applies the reverse of the Feistel cipher applied by +feis.

Accepts

.m is an $atom.

Produces

An $atom.

Source

Examples


+fee:ob

"Fe" in B&R (2002).

A Feistel cipher given the following parameters:

  • .r: Number of Feistel rounds.

  • .a, .b: Parameters such that ab >= k.

  • .k: Value such that the domain of the cipher is [0, k - 1].

  • .prf: A gate denoting a family of pseudorandom functions indexed by its first argument and taking its second argument as input.

  • .m: An input value in the domain [0, k - 1].

Accepts

.r, .a, .b, .k are an $atoms.

.prf is a gate: $-([j=@ r=@] @).

.m is an $atom.

Produces

An $atom.

Source


+feen:ob

Reverse +fee.

"Fe^-1" in B&R (2002). Reverses a Feistel cipher constructed with parameters as described in +fee.

Accepts

.r, .a, .b, and .k are $atoms.

.prf is a gate: $-([j=@ r=@] @).

.m is an $atom.

Produces

An $atom.

Source


+fe:ob

An internal function to +fee.

Note that this implementation differs slightly from the reference paper to support some legacy behaviour.

Accepts

.r, .a, and .b are $atoms.

.prf is a gate: $-([j=@ r=@] @).

.m is an $atom.

Produces

An $atom.

Source


+fen:ob

Reverse +fe.

This is an internal function to +feen

Note that this implementation differs slightly from the reference paper to support some legacy behaviour.

Accepts

.r, .a and .b are $atoms.

.prf is a gate: $-([j=@ r=@] @).

.m is an $atom.

Produces

An $atom.

Source


+eff:ob

Murmur3-based pseudorandom function.

'F' in B&R (2002).

  • .j is a number between 0 and 3, selecting the seed with that index in +raku.

  • .r is an $atom with a maximum length of two bytes. This is an internal function of +feis and +tail.

Accepts

.j is an $atom.

.r is an $atom.

Produces

An $atom.

Source

Example


+raku:ob

Key list.

Produces a list of arbitrary hexademical keys for use with +eff.

Produces

A list of $atoms of aura @ux (hexadecimal).

Source

Examples


Last updated