instruction
stringlengths
15
30k
In which step of AES uses the Key to encrypt data?
AES has the following steps in encryption: SubBytes, ShiftRows, MixColumns, and AddRoundKey and the following steps in decryption: InvSubBytes, InvShiftRows, InvMixColumns, and Inverse of AddRoundKey. My question is: in which step of encryption and decryption is the key used to encrypt and decrypt data?
In which step does AES use the key to encrypt data?
"Recently" the Ukraine standardized a new block cipher *Kalyna*, which according to the abstract of<br>["A New Encryption Standard of Ukraine: The Kalyna Block Cipher" by Oliynykov et al.][1] (warning: the paper contains *a lot* of test-vectors) is basically a modified version of AES. The high-level changes (to Rij...
In this protocol: 1. A → B : { <[A, {K}pk(B)]> }pk(B) 2. B → A : { <[B, {K}pk(A)]> }pk(A) I'd like to determine why this is insecure. How can the attacker learn the key K if A and B are both honest agents? This is what I have started with: 1. A → B : { <[A, {K}pk(B)]> }pk(B) An attacker M can intercept...
I am studying the NP-Problem of the codes Syndrome Decoding. The formulation is show below. Input: a binary matrix $H$ of dimension $r \times n$ and a bit string $S$ of length $r$. Property: there exists a set of $w'$ columns of $H$ adding to $S$ (with $0 < w' \leq w$). I understand that this problem is hard...
What if the p and q used in keys generation of Pailler cryptosystem are composite?
Let $p$ prime number $q/p-1$ prime and $g\in (Z/pZ)^*$ element of order $q$.Also $a\in \{1,...,q-1\}$ the private key and $y\equiv g^a\pmod p$ the correspoding public key.For each of the following systems ElGamal give the authentication algorithm of signature $(r,s)$ $1)$ $r\equiv g^k\pmod p$ ,$s\equiv k^{-1}(h...
I'm looking for a way for someone to prove to me their geographical location without a trusted third-party. Imagine wanting to prove to someone you're actually physically in a specific place. I'd imagine you'd need something like perhaps a receiver of some kind to triangulate the location of a satellite that could perh...
Is there any such thing as "proof of location"?
I need a short [addition chain][1] for a number $n>2^{100}$ in order to implement a fast exponentiation. The memory footprint is not important. Finding an optimal chain for a large number $n$ is difficult (and considered by some to be an NP-complete problem). However, many heuristics to find good but suboptimal chai...
I need a short [addition chain][1] for a number $n>2^{100}$ in order to implement a fast exponentiation. The memory footprint is not important. Finding an optimal chain for a large number $n$ is difficult (and considered by some to be an NP-complete problem). However, many heuristics to find good but suboptimal chai...
A clear cut answer to your question is NO for now. In the literature there is no an accurate and reliable scheme that can determine geolocation of the data. They are basically timing-based schemes and the problem with timing (in this case) is that many factors can affect it. Also they usually assume that there are some...
I've been told that prime-number factoring is based on a "roman-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and t...
I've been told that prime-number factoring is based on a "roman-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and t...
Let $p$ prime number $q/p-1$ prime and $g\in (Z/pZ)^*$ element of order $q$.Also $a\in \{1,...,q-1\}$ the private key and $y\equiv g^a\pmod p$ the correspoding public key.For each of the following systems ElGamal give the verification algorithm of signature $(r,s)$ $1)$ $r\equiv g^k\pmod p$ ,$s\equiv k^{-1}(h(m...
What consequences do the plaintext space size has on the performances in the BGV scheme?
I've been told that prime-number factoring is based on a "roman-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and t...
In the BGV paper [1], the authors say in §5.4 that you can have $\mathbb{Z}_p$ as plaintext size with a large $p$. What is the impact of the size of $p$ on the ciphertext size and computational work of the cipher's algorithms? I would need this to decide how big my plaintext space can be before it becomes impract...
I've been told that prime-number factoring is based on a "roman-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and t...
Let $p$ prime number $q/p-1$ prime and $g\in (Z/pZ)^*$ element of order $q$.Also $a\in \{1,...,q-1\}$ the private key and $y\equiv g^a\pmod p$ the correspoding public key.For each of the following systems ElGamal give the verification(authentication) algorithm of signature $(r,s)$ $1)$ $r\equiv g^k\pmod p$ ,$s\...
I've been told that prime-number factoring is based on a "roman-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and t...
I've been told that prime-number factoring is based on a "roman-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and t...
Are there any examples of practical attacks on cryptosystems set over elliptic curves which utilize the easiness of DDH for certain choices of curves $E(\textbf{F}_q)$, and as such their lack of semantic security? I'm looking for something along the lines of using the Jacobi symbol to narrow the set of possible plainte...
Are there any examples of practical attacks on cryptosystems set over elliptic curves which utilize the easiness of DDH for certain choices of curves $E(\textbf{F}_q)$, and as such their lack of semantic security? I'm looking for something along the lines of using the Jacobi symbol to narrow the set of possible plainte...
Are there any examples of practical attacks on cryptosystems set over elliptic curves which utilize the easiness of DDH for certain choices of curves $E(\textbf{F}_q)$, and as such their lack of semantic security? I'm looking for something along the lines of using the Jacobi symbol to narrow the set of possible plainte...
> Alice uses an ElGamal signature in group $(Z/pZ)^{*}$ without using hash function. To sign the message $m \in (Z/pZ)^*$ calculates the signature $(r,s)$ as follows: choose random $k \in \{0, 1, \dots, q-1\}$ where $q/p-1$ is prime number and the order of the base $g$ and then calculates $r\equiv g^{k}\pmod p$ and $s...
> Is it deliberate that point addition isn't mentioned anywhere in the API or documentation? Yes. The idea is to offer a minimal API that makes doing the right thing for security easy, while avoiding low level operations that allow shooting yourself in the foot. To quote [this primer][1] (pdf) on NaCl: > A typ...
In NaCl and libsodium, the `crypto_scalarmult` function implements the operation $Q = kP$ (scalar/point multiplication). There doesn't seem to be a function for point addition $K = P + Q$ though. Something like point addition must be implemented somewhere I think, as part of the implementation of scalar multiplicati...
I know there already is a very similar question. However, I can't understand why $G'(s)$ is not a PRG. If $G(s)$ is a PRG, then why $G(s||0)$ can't also be a PRG? How can the distribution over $G(s||0)$ be distinguishable from a truly uniform distribution of the same output range?
Knowing that $G(s)$ is a PRG, is the following construction $G'(s) = G(s||0)$ a PRG?
I know there already is a very similar question. However, I can't understand why $G'(s)$ is not a PRG. If $G(s)$ is a PRG, then why $G(s||0)$ can't also be a PRG? How can the distribution over $G(s||0)$ be distinguished from a truly uniform distribution of the same output range?
"Knowing that $G(s)$ is a PRG, is the following construction $G'(s) = G(s||0)$ a PRG?" $\:$ Maybe. "If $G(s)$ is a PRG, then why $G(s||0)$ can't also be a PRG?" <br> $G'$ _can_ "also be a PRG". $\:$ (It's just _not necessarily_ also a PRG.) "How can the distribution over $G(s||0)$ be distinguished from a truly ...
Is it possible to solve the Hidden Number Problem in extension fields? In particular in $GF(2^n)$? Let's suppose an attacker knows some least/most significant bits of $r_i = a_i \times k$ in a given field $GF(2^n)$, for many uniformly distributed and known $a_i$ and a fixed and unknown $k$. Is it possible to recover...
Can we solve the Hidden Number Problem in $GF(2^n)$?
I'm looking for a way to prove that a certain amount of data was stored, through some easily verifiable piece of information. Similarly to how proof-of-work can prove through a hash that a certain amount of work was done to generate such hash. I don't need this "proof" to tell me whether that data is *currently* sto...
*Perfect Secrecy* (or *information-theoretic secure*) means that the ciphertext conveys no information about the content of the plaintext. In effect this means that, no matter how much ciphertext you have, it does not convey anything about what the plaintext and key were. It can be proved that any such scheme must use ...
Not all ciphers can be broken, even by infinitely powerful adversaries. When used correctly, the [One Time Pad (OTP)](http://en.wikipedia.org/wiki/One-time_pad) is [information-theoretic secure](http://en.wikipedia.org/wiki/Information_theoretic_security), which means it can't be broken with cryptanalysis. However, ...
Let $p$ prime number $q/p-1$ prime and $g\in (Z/pZ)^*$ element of order $q$.Also $a\in \{1,...,q-1\}$ the private key and $y\equiv g^a\pmod p$ the correspoding public key.For each of the following systems ElGamal give the verification(authentication) algorithm of signature $(r,s)$ 1. $r\equiv g^k\pmod p$ ,$s\eq...
> Knowing that $G(s)$ is a PRG, is the following construction $G'(s) = G(s||0)$ a PRG? Maybe. > If $G(s)$ is a PRG, then why $G(s||0)$ can't also be a PRG? $G'$ _can_ "also be a PRG". (It's just _not necessarily_ also a PRG.) > How can the distribution over $G(s||0)$ be distinguished from a truly uniform di...
To give this question its deserved answer, I’ll repeat [what Ricky Demer noted](http://crypto.stackexchange.com/questions/16031/is-g-is-a-secure-prg?rq=1#comment34007_16031) in his comment: $$G(x \oplus 1^s) = F(k,x \oplus 1^s) \oplus F(k,x \oplus 1^s \oplus 1^s) \\ \downarrow \\ F(k,x \oplus 1^s) \oplus F(k,x \...
To give this question its deserved answer, I’ll repeat [what Ricky Demer noted](http://crypto.stackexchange.com/questions/16031/is-g-is-a-secure-prg?rq=1#comment34007_16031) in his comment: $$G(x \oplus 1^s) = F(k,x \oplus 1^s) \oplus F(k,x \oplus 1^s \oplus 1^s) \\ \downarrow \\ F(k,x \oplus 1^s) \oplus F(k,x \...
If, as can be reasonably inferred from the question, a fresh random $k$ is chosen on each invocation of $G$, then $G$ is not a pseudorandom generator because it is not deterministic. (A pseudorandom generator by definition is a deterministic algorithm.) If $k$ is fixed, then more information would be needed. For exa...
Is the following function a secure PRG? > Given $F$ is a secure PRG and $k$ is choosen random from key space $K$. > > $$G(x) = F(k,x) \oplus F(k,x \oplus 1^s)$$ My solution is $x \oplus 1^s = x'$ so $G(x)$ becomes $f \oplus f'$ with $f = F(k,x)$ and $f' = F(k,x')$. Clearly $f$ and $f'$ are PRG, i.e. generate r...
Is $G$ a secure PRG?
$F$ is a PRF with $n$ bit key, input, and output length. I know the answer is "NO it isn't!", but I can't understand why. Is that because on any input $x$, the keys for every $F$ in the sequence are fixed, which implies that the $F$ functions are not randomly chosen over $2^{-n}$? Could this be a possible answer?
Let $F$ be a pseudorandom function, is the following $G(x)=F_{0…0}(x)∥F_{0…1}(x)|| ... ||F_{1…1}(x)$ a PRG?
Let $F$ be a PRF, is the following $G(x)=F_{0…0}(x)∥F_{0…1}(x)|| ... ||F_{1…1}(x)$ a PRG?
$F$ is a PRF with $n$ bit key, input, and output length. I know the answer is "NO it isn't!", but I can't understand why. Is that because on any input $x$, the keys for every $F$ in the concatenation sequence are fixed, which implies that the $F$ functions are not randomly chosen over $2^{-n}$? Could this be a possible...
What is the advantage of AEAD ciphers? Why is the TLS working group pushing for them? I thought modern cipher suites require SHA256 for authentication. What advantage is there to including Poly1305?
What is the advantage of AEAD ciphers?
> What is the advantage of AEAD ciphers? That depends on the scheme, but often it means you: * Trust only on algorithm, not two. * Perform only one pass * Save on code and sometimes computation. The code savings can matter in embedded and IoT settings. > Why is the TLS working group pushing for them? I...
> What is the advantage of AEAD ciphers? That depends on the scheme, but often it means you: * Trust only on algorithm, not two. * Perform only one pass (an ideal in the world of AEAD, not a consequence of it) * Save on code and sometimes computation. The code savings can matter in embedded and IoT settings....
The official docs of AES have several example of how hexadecimal or byte input can be encrypted. I have some problem about the input text and cipher key. My question is: 1. How can encrypt string input in AES or how AES treat string input? If I use a string input [example: "Admin"] than how AES encrypt it? If I use ...
How AES treat string input to encrypt data and what will happen if the cipher key is less than that expected?
The official docs of AES have several example of how hexadecimal or byte input can be encrypted. I have some problem about the input text and cipher key. My question is: 1. How can encrypt string input in AES or how AES treat string input? If I use a string input [example: "Admin"] than how AES encrypt it? If I use ...
Commonly there are four ways to "break" a secrecy-focused cryptosystem: 1. Recover the secret key 2. Recover the message 3. Distinguish an encryption from random noise 4. Distinguish the encryption of two different messages The practical implications of the first two breaks are obious: They allow arbitrary...
What are the practical implications of ciphertext distinguishability?
The official docs of AES have several example of how hexadecimal or byte input can be encrypted. I have some problem about the input text and cipher key. My question is: 1. How can encrypt string input in AES or how AES treat string input? If I use a string input [example: "Admin"] than how AES encrypt it? If I use ...
> What is the advantage of AEAD ciphers? That depends one the scheme, but often it means you: * Trust only on algorithm, not two. * Perform only one pass (an ideal in the world of AEAD, not a consequence of it) * Save on code and sometimes computation. The code savings can matter in embedded and IoT settings...
I've been told that prime-number factoring is based on a "roman-doll" sequence of matrices, where a seed matrix of height Y and width X exists consisting of all zeros except for a single 1 at row Y column X. For every x columns added, the matrix grows by y, and two closely related formulas sum the column vectors and t...
If $p$ is an odd prime and $n$ natural,it is known that the group $Z^*_{p^n}$ is cyclic.Explain why the selection-choice of the group $Z^*_{{3^{1000}}}$ for the construction of a cryptosystem ElGamal it's not good. Can anyone explain me why this happens?
In order to achieve very high security for privacy, would it be smart to use one time pad ciphers in emails? The distribution of the keyword would pose no problems since I would distribute it to other people in person, therefore avoiding interception.
In order to achieve very high security for privacy, would it be smart to use one time pad ciphers in emails? The distribution of the keyword would pose no problems since I would distribute it to other people in person, therefore avoiding interception. Just to avoid confusion, by keyword I mean a random string of bi...
I'm somewhat new to encryption. So, Why is 256 Bit the max I see on encryption programs for Big data. Can more powerful encryption algorithms be used practically?
Encryption algorithms larger than 256 Bit for Big Data encryption?
> How the cipher key is scheduled if it is less than 128 bit (for AES 128), or less than 192 bit (for AES 192) or less than 256 (for AES 256)? That is undefined; the AES specification does not address that possibility. The AES 128 algorithm assumes that you give it 128 bits of key (and tells you exactly what to do ...
**Note:** For $y^2 \equiv x^3 + ax + b$, you want $$m\equiv(3x^2+a)*(2y)^{-1}$$ which is a shortcut that only makes sense once you understand how elliptic curves work. >"Why does it say y=1 and 4 for x=1?" Like you said, plug in & solve: $$y^2 \equiv 1^3 + 2(1) + 3 \equiv 6 \equiv 1\space(mod\space5)$$ Ask yo...
I'm somewhat new to encryption. When looking at encryption programs for [*big data*](http://datascience.stackexchange.com/questions/tagged/bigdata), I frequently see a maximum of 256 bits. Why do we generally restrict our (symmetric) keys to 256 bits? Can more powerful encryption algorithms be used practically, or ...
Encryption algorithms larger than 256 Bit for “big data” encryption?
In order to achieve very high security for privacy, would it be cryptographically secure to use one time pad ciphers in emails? The distribution of the keyword would pose no problems since I would distribute it to other people in person, therefore avoiding interception. Just to avoid confusion, by keyword I mean a ...
Are there any paper/human executed crypto systems that have reasonable strength? I am aware of a few candidates so far 1. Solitare from Cryptonomicon https://en.wikipedia.org/wiki/Solitaire_(cipher) (54! unique keys) 1. Off the grid https://www.grc.com/offthegrid.htm (ridiculous amount of entropy, but having plain...
Are there any paper/human strong crypto systems?
Actually, that wikipedia article you mention in your question already answers your question: > It is moderately common for companies and sometimes even standards bodies as in the case of the CSS encryption on DVDs – to keep the inner workings of a system secret. Some argue this "security by obscurity" makes the pro...
Please tell me is [gost cipher][1] broken or known to be weak and non-secure? please try to simplify your answer since I am a programmer and not a cryptographer and please consider this [article][2] and tell me if they are true. thank you very much for your help and time in advance. [1]: https://en.wikipedia.or...
is gost block cipher broken?
Please tell me is [gost cipher][1] broken or known to be weak and non-secure? Please try to simplify your answer since I am a programmer and not a cryptographer and please consider this [article][2] and tell me if they are true. [1]: https://en.wikipedia.org/wiki/GOST_%28block_cipher%29 [2]: http://www.cryptosy...
Is gost block cipher broken?
Is the [GOST cipher][1] broken or known to be weak and insecure? Please try to simplify your answer since I am a programmer and not a cryptographer and please consider this [web page][2] and tell me if the claims made there are true. [1]: https://en.wikipedia.org/wiki/GOST_%28block_cipher%29 [2]: http://www.cry...
Is the GOST block cipher broken?
After the introduction of McBits, I was interested [what security notions are neccessary for IND-CCA2 security of *integrated encryption schemes*][1] (IES, following the *key encapsulation mechanism / data encapsulation mechanism* KEM/DEM approach). Now I've recently answered a different question and stated that the [...
Is constructing IND-CCA2 public key encryption schemes particularly easy with the KEM/DEM approach?
After the introduction of McBits, I was interested [what security notions are neccessary for IND-CCA2 security of *integrated encryption schemes*][1] (IES, following the *key encapsulation mechanism / data encapsulation mechanism* KEM/DEM approach). Now I've recently answered a different question and stated that the [...
After the introduction of McBits, I was interested [what security notions are neccessary for IND-CCA2 security of *integrated encryption schemes*][1] (IES, following the *key encapsulation mechanism / data encapsulation mechanism* KEM/DEM approach). Now I've recently answered a different question and stated that the [...
After the introduction of McBits, I was interested [what security notions are neccessary for IND-CCA2 security of *integrated encryption schemes*][1] (IES, following the *key encapsulation mechanism / data encapsulation mechanism* KEM/DEM approach). Now I've recently answered a different question and stated that the [...
I am not exactly sure if this is for math stackexchange or crypto: If a TRNG outputs a bit-string in the following format: $X_1,X_2,...X_N $ where each $X_i$ is a Gaussian Truly random BYTE (the generator outputs truly random Gaussian bytes) and the random string is the concatenation of these RV outputs, is it possi...
I am not exactly sure if this is for math stackexchange or crypto: A TRNG outputs numbers in $[0,1]$ in a Gaussian distribution. I would like to convert them into uniform random bytes ($[0,255] $) to perform byte operations. What is s cryptographically secure method of doing this?
>How is the MAC or HMAC secret shared with the other party for verification? It depends on the type of implementation or system you are interested in, but i can share my experience. Unless pre-agreed key is known before hand, usually a public key cryptography is used to share secret key (e.g. AES-key) over a public ...
I'm trying to understand how certificate signing and verification works conceptually. I know the classic example with asymmetric cryptography- the sender encrypts data with public key of receiver, data goes over unsecure channel, receiver **decrypts with private key**. When it comes to certificate verification that'...
After the introduction of McBits, I was interested [what security notions are neccessary for IND-CCA2 security of *integrated encryption schemes*][1] (IES, following the *key encapsulation mechanism / data encapsulation mechanism* KEM/DEM approach). Now I've recently answered a different question and stated that the [...
I currently try to implement Ed25519 following this [draft][1]. I have implemented every field operation except the reduction by the group order q (in chapter 5). I looked for a reduction algorithm and found montgomery reduction and barrett reduction. Because Barrett reduction seems to be more fitting I tried to unders...
Is modular Barrett reduction usable for Ed25519?
since I am new to Cramer Shoup algorithm I want to know is it possible to have 2 different private key for a public key due the key pair generation algorithm that Cramer Shoup use? I know that in public key algorithms generally that is not possible but I want to make sure of what is the answer for Cramer Shoup. thank ...
can cramer-shoup public key have two difefrent private key?
After the introduction of McBits, I was interested [what security notions are neccessary for IND-CCA2 security of *integrated encryption schemes*][1] (IES, following the *key encapsulation mechanism / data encapsulation mechanism* KEM/DEM approach). Now I've recently answered a different question and stated that the [...
I've implemented this algorithm which, working from the end of the message backwards, creates a valid CBC ciphertext from any plaintext, using the block cipher's decryption operation instead of the encryption operation. [![weird CBC, image style courtesy wikipedia][1]][1] I bet this is described in the literature...
I've implemented this algorithm which, working from the end of the message backwards, creates a valid CBC ciphertext from any plaintext, using the block cipher's decryption operation instead of the encryption operation. [![enter image description here][1]][1] I bet this is described in the literature, somewhere. ...
> What is this method/algorithm/construction called? Dunno; this is a new one on me. > Is it as secure as CBC implemented the normal way? Should be. Modeled as an abstract 'take plaintext, output ciphertext' model, this method (with a random last ciphertext bits) has precisely the same ciphertext output dist...
According to the Ed25519 paper, the (potentially long) input message is hashed twice (see http://ed25519.cr.yp.to/ed25519-20110926.pdf Section 4 page 12 steps 1 and 3). The webpage https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/ has a nice diagram toward the bottom that illustrates this, and I confirmed it in...
More efficient and just as secure to sign message hash using Ed25519?