21
votes
Is there a standard, or widely accepted convention, for magic constants in crypto software?
If you just need a constant to begin your algorithm, and the value of that constant isn't important, why not have a widely known convention to always use the digits of Pi or Phi or other well known ...
13
votes
Is there a standard, or widely accepted convention, for magic constants in crypto software?
If you just need a constant to begin your algorithm, and the value of that constant isn't important, why not have a widely known convention to always use the digits of Pi or Phi or other well known ...
10
votes
Is there a standard, or widely accepted convention, for magic constants in crypto software?
Ostensibly, there is a convention for constants. It's vanity.
The criteria for such a constant is to disassociate the number from any possible influence it might have on the algorithm. Yes, high ...
8
votes
Accepted
How constant value 0x63 in affine transformation is chosen or generated while AES Substitution Box is formed?
According to the Rijndael AES proposal (emphasis mine):
We have chosen an affine mapping that has a very simple description per se, but a complicated algebraic expression if combined with the ‘...
7
votes
Accepted
Origin of the SHA-224 initial hash value?
The SHA-224 initial values are the second 32 bits of the fractional parts of the square roots of the 9th through 16th primes (namely, 23 through 53), or in other words, $\lfloor 2^{64} \sqrt{p} \...
4
votes
Accepted
How complex must round constants be to resist slide attacks?
It depends on the actual block cipher and is quite an open problem. For example, SCREAM, iSCREAM and Midori64 use such key schedule (i.e., its absense) with sparse round constants. They were broken ...
4
votes
Accepted
Amateur question: Constant two way cryptography
I don't know why do they change like this every time i run the exact same piece of code again and again.
What you are actually doing here (under the hood) is most likely using a cryptographic system ...
4
votes
Amateur question: Constant two way cryptography
Two reasons why cryptographic algorithm often behaves as you observe (non-deterministically):
When the objective is to encipher some secret, it is necessary for security in many scenario. Otherwise, ...
3
votes
Using non-standard constants for SHA-256
Those are "nothing up my sleeve" numbers, their values aren't central to the security of the algorithm. Nevertheless an intent to arbitrarily choose different and thus incompatible values probably ...
3
votes
How is the MD2 hash function S-table constructed from Pi?
Based on mikeazo's pseudocode, here's a fully working program in Python 3 that will generate the S-table:
...
3
votes
Accepted
Early propagation of carries in the BLAKE hash function
This is already covered by Ella's response, but in short the added nonlinearity at the start buys you very little in terms of security, compared to its cost in number of operations. It would be more ...
3
votes
Nothing-up-my-sleeve numbers standard
A (probably weak) reason not to use a standard is that some nothing-up-my-sleeve numbers may serve some sort of purpose. As an example, you cannot change Salsa20's constants to anything, it must be ...
3
votes
Explanation of the tables found in Kyber round1 code?
As you can see in the comment of the code, the tables have been computed using Pari/GP, which mean you could regenerate them using the same code.
The details can be stitched together from this Kyber ...
2
votes
Nothing-up-my-sleeve numbers standard
The constants in cryptography that can be chosen arbitrarily are typically not likely to be good candidates for backdooring. The constants in cryptography that can be backdoored usually have ...
2
votes
Accepted
Where do the constants for SHA-1/2/3 come from?
Regarding the IVs and round constants of hash functions...
The question for SHA1 and SHA2 families have already been answered. Rotational constants were chosen by the designers to make the hash ...
2
votes
Early propagation of carries in the BLAKE hash function
What are the benefits of guaranteeing early propagation of carries
Addition without carries is equivalent to XOR. Consider the addition of the following two bit strings performed modulo $2^8$:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
constants × 23hash × 9
algorithm-design × 7
sha-2 × 5
encryption × 2
keys × 2
post-quantum-cryptography × 2
lattice-crypto × 2
initialization-vector × 2
sha-1 × 2
s-boxes × 2
sha-3 × 2
kyber × 2
aes × 1
elliptic-curves × 1
cryptanalysis × 1
homomorphic-encryption × 1
sha-256 × 1
stream-cipher × 1
implementation × 1
reference-request × 1
attack × 1
finite-field × 1
md5 × 1
sha-512 × 1