Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pseudo-Hadamard transform
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
The '''pseudo-Hadamard transform''' is a reversible transformation of a bit string that provides [[diffusion (cryptography)|cryptographic diffusion]]. See [[Hadamard transform]]. The bit string must be of even length so that it can be split into two bit strings ''a'' and ''b'' of equal lengths, each of ''n'' bits. To compute the transform for Twofish algorithm, ''a''<nowiki>'</nowiki> and ''b''<nowiki>'</nowiki>, from these we use the equations: :<math>a' = a + b \, \pmod{2^n}</math> :<math>b' = a + 2b\, \pmod{2^n}</math> To reverse this, clearly: :<math>b = b' - a' \, \pmod{2^n}</math> :<math>a = 2a' - b' \, \pmod{2^n}</math> On the other hand, the transformation for '''SAFER+''' encryption is as follows: :<math>a' = 2a + b \, \pmod{2^n}</math> :<math>b' = a + b\, \pmod{2^n}</math> ==Generalization== The above equations can be expressed in [[Matrix (mathematics)|matrix algebra]], by considering ''a'' and ''b'' as two elements of a vector, and the transform itself as multiplication by a matrix of the form: :<math>H_1 = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}</math> The inverse can then be derived by [[Invertible matrix|inverting]] the matrix. However, the matrix can be generalised to higher dimensions, allowing vectors of any power-of-two size to be transformed, using the following recursive rule: :<math>H_n = \begin{bmatrix} 2 \times H_{n-1} & H_{n-1} \\ H_{n-1} & H_{n-1} \end{bmatrix}</math> For example: :<math>H_2 = \begin{bmatrix} 4 & 2 & 2 & 1 \\ 2 & 2 & 1 & 1 \\ 2 & 1 & 2 & 1 \\ 1 & 1 & 1 & 1 \end{bmatrix}</math> ==See also== * [[Secure and Fast Encryption Routine|SAFER]] * [[Twofish]] This is the Kronecker product of an Arnold Cat Map matrix with a Hadamard matrix. ==References== * James Massey, "On the Optimality of SAFER+ Diffusion", 2nd AES Conference, 1999. [http://csrc.nist.gov/archive/aes/round1/conf2/papers/massey.pdf] * Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, "[[Twofish]]: A 128-Bit [[Block cipher|Block Cipher]]", 1998. [http://www.schneier.com/paper-twofish-paper.html] * Helger Lipmaa. On Differential Properties of Pseudo-Hadamard Transform and Related Mappings. [[INDOCRYPT]] 2002, LNCS 2551, pp 48-61, 2002.[https://web.archive.org/web/20090218060451/http://research.cyber.ee/~lipmaa/papers/lip02c/] {{crypto-stub}} ==External links== * [http://eprint.iacr.org/2004/010.pdf Fast Pseudo-Hadamard Transforms] [[Category:Theory of cryptography]] [[Category:Transforms]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Asbox
(
edit
)
Template:Crypto-stub
(
edit
)