Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [constants]

Fixed, more or less arbitrary parameter values that appear in the definitions of cryptographic schemes, such as fixed initialization vectors for hash functions or S-box tables for block ciphers.

Filter by
Sorted by
Tagged with
6 votes
3 answers
964 views

Nothing-up-my-sleeve numbers standard

Premise Several cryptographic primitives employ randomized numerical constants. To avoid suspicious that the designer selected such constants in order to plant a backdoor, "nothing-up-my-sleeve ...
user38141's user avatar
  • 160
8 votes
0 answers
285 views

How are the constants found in the AVX2 implementation of CRYSTALS-KYBER round 2 generated?

The post-quantum lattice-based cryptosystem CRYSTALS-KYBER which has made it to the second round of NIST PQC includes two implementations: 1) a baseline reference implementation in C and 2) an ...
caesar's user avatar
  • 315
1 vote
1 answer
206 views

Explanation of the tables found in Kyber round1 code?

The precomp.c file in Kyber NIST round 1 submission has three tables, could you please let me know how to generate these three tables? If I want to understand how ...
pool liver's user avatar
1 vote
0 answers
82 views

Constructing Low-Density Parity-Check Codes of length $n$ and minimum distance = $\delta n$ over $GF(q)$? [closed]

I am looking for a way to construct an LDPC (Low-Density Parity-Check) Code $C$ of length $n$ and minimum distance $d_C$ that scales linearly to $n$, meaning $d_C = \delta n$ for $\delta \in (0,1)$. ...
Noura AIT MANSSOUR's user avatar
3 votes
1 answer
772 views

Where do the constants for SHA-1/2/3 come from?

My request is: I need to know the source of constants (shift constants, IV, or S-Box) for the following algorithms: SHA-1 SHA-2 (all sizes) SHA-3 Examples: BLOWFISH uses the hexadecimal ...
m.nasim's user avatar
  • 105
8 votes
1 answer
216 views

How complex must round constants be to resist slide attacks?

A key schedule that generates round keys by XORing a round constant with the key is linear and can be vulnerable to related key attacks, but let's ignore that for now. Constants are necessary to avoid ...
forest's user avatar
  • 15.3k
5 votes
2 answers
240 views

Early propagation of carries in the BLAKE hash function

The BLAKE paper uses round constants derived from $\pi$ to improve diffusion, even if the additions modulo $2^{32}$ are replaced with bitwise XOR when processing a null message and null initial state: ...
forest's user avatar
  • 15.3k
1 vote
1 answer
500 views

Using non-standard constants for SHA-256

For SHA-256, FIPS 180-4 states the following on the constants: These words represent the first thirty-two bits of the fractional parts of the cube roots of the first sixty-four prime numbers. If ...
craigh's user avatar
  • 21
0 votes
2 answers
148 views

Amateur question: Constant two way cryptography

First of all, I would like to tell you guys that I'm a complete noob at cryptography in general, so please pardon any dumb stuff I may say. Well, I have used a lot of cryptography libraries in a ...
Lucas Meine's user avatar
34 votes
3 answers
5k views

Is there a standard, or widely accepted convention, for magic constants in crypto software?

Inspired by Magic "Nothing Up My Sleeve" Numbers - Computerphile - YouTube [5:31]. If you just need a constant to begin your algorithm, and the value of that constant isn't important, why not have a ...
Low Powah's user avatar
  • 441
3 votes
1 answer
834 views

Origin of the SHA-224 initial hash value?

At the start of each of the SHA-0 through -2 algorithms, the initial state is set to certain constants. I'm curious where the initialization values in SHA-224 are from. MD5's initial values are ...
Myria's user avatar
  • 2,575
1 vote
0 answers
415 views

How Elliptic Curve equation is chosen?

We all know the basic equation of Elliptic Curve is $y^2 \equiv x^3 + ax + b \pmod p$ How the value of the constants $a$ and $b$ are chosen? Suppose $\mathbb P\ni p \approx 2^{256}$ then what ...
Arnab Rahman's user avatar
7 votes
1 answer
1k views

How constant value 0x63 in affine transformation is chosen or generated while AES Substitution Box is formed?

Me and one of my friends are working on AES algorithm. We have understood how multiplicative inverse table is generated. Rijndael AES algorithm shows us how S-Box is generated through the affine ...
Arnab Rahman's user avatar
4 votes
1 answer
2k views

How are the IVs of SHA-512/256 and SHA-512/224 calculated?

This seems odd to me, because there are a lot of resources out there saying that the initializer values of SHA-512 and SHA-384 are the first 64 bits of the fractional parts of the square roots of ...
polfosol's user avatar
  • 201
1 vote
1 answer
164 views

Can homomorphic operations on many different ciphertexts be multiplied by a same constant?

Assume Alice encrypts messages $m_1$,...,$m_n$ using secret keys $k_1$,...,$k_n$ on a homomorphic encryption scheme (BHHO), so she would get $c_1=Enc_{k_1}(m_1)$,...,$c_n=Enc_{k_n}(m_n)$. Then Alice ...
sam zhao's user avatar
2 votes
1 answer
226 views

MDC-2 recommended IV values?

I'm currently reading Menezes' "Handbook of Applied Cryptography", and in it, when describing the MDC-2 cryptographic hash function, has the following line: Choose the 64-bit non-secret constants $...
Cisplatin's user avatar
  • 145
8 votes
1 answer
1k views

Why have round constants in hashes?

This may seem like basic crypto knowledge, but why do hash functions like SHA-2 and Whirlpool have round constants that are absorbed into their respective states? I can understand that in a cipher ...
Paul Uszak's user avatar
  • 15.5k
8 votes
1 answer
371 views

How many degrees of freedom up my sleeve?

Now that we know how the MD2 S-box was constructed, I find myself wondering how good a nothing up my sleeve number it really is. It is derived from $\pi$, but not in a very obvious way, even in ...
otus's user avatar
  • 32.1k
6 votes
1 answer
2k views

Significance of rotation constants in SHA-512?

In a single round of SHA-512, in the operations $\Sigma_0(A)$, $\Sigma_1(E)$ why are the constants $28$, $34$, and $39$ used for the number of rotations? What significance do these numbers have? What ...
user avatar
2 votes
1 answer
916 views

Are the MD5 constants an S-Box?

I noticed that several hash algorithms, in this case MD5, defines some constants. MD5 defines 64 constant values (the shift count per round) which also gets expand (via sine) to a summand for a ...
Bastian Born's user avatar
40 votes
2 answers
3k views

How is the MD2 hash function S-table constructed from Pi?

For fun, I'm learning more about cryptography and hashing. I'm implementing the MD2 hash function following RFC 1319 (https://www.rfc-editor.org/rfc/rfc1319). I'll preface by saying I know there are ...
Keith's user avatar
  • 503
11 votes
1 answer
2k views

Why are the initial states of hashes functions (like SHA-1) often non-zero?

There is already a question asking "Why initialize SHA1 with specific buffer?" and my question follows on from this: Why are the initial states of hash functions often non-zero? For most, I have ...
Cryptographeur's user avatar
13 votes
1 answer
6k views

Security considerations on "expand 32-byte k"-magic number in the Salsa20 family of stream ciphers?

I'm currently examining the NaCl library written by Daniel J. Bernstein and I noticed that the library hard codes the sigma: ...
Pascal's user avatar
  • 233