instruction
stringlengths
15
30k
I was trying to understand the procedure of the DPA attack on Stream cipher (like Mickey-128). I learned that, the attacker need to build hypothetical power consumption matrix with different initial vectors. for example, using hamming-distance model to describe the power consumption based on R & S registers. But by do...
How to generate initial vectors during DPA attack on stream cipher in real life?
What RC4 key value will completely invert S after the initial permutation (so that S[0] = 255, S[1] = 254, …, S[254] = 1, S[255] = 0)?
Are there any arithmetic or mathematical functions that can be used as PRPs or PRFs ? Since, Conventional block ciphers like AES are that are proven to be good PRPs are not based on mathematics but on other principles like confusion and diffusion etc.
I know about PBKDF2, bcrypt, scrypt, etc. and while I'm not a crypt professional, I think I understand why are they better than just "hash(pass+salt)". But a colleague of mine surprised me with the following password hash function which he claims to be good, because 1. It is slow on CPU (takes about 2-3 seconds ...
I know about PBKDF2, bcrypt, scrypt, etc. and while I'm not a crypt professional, I think I understand why are they better than just "hash(pass+salt)". But a colleague of mine surprised me with the following password hash function which he claims to be good, because 1. It is slow on CPU (takes about 2-3 seconds ...
This question is inspired by this [recent one][1]. I worded it as homework that could be asked in a _computer security with applied cryptography_ class. Some system keeps track of user passwords as `(userID, H)` pairs with `H` of 20 octets and a single pair per `userID`. To test an alleged `Password` for some `userI...
This question is inspired by this [recent one][1]. I worded it as homework that could be asked in a _computer security with applied cryptography_ class. Some system keeps track of user passwords as `(userID, H)` pairs with `H` of 20 octets and a single pair per `userID`. To test an alleged `Password` for some `userI...
I was trying to understand the procedure of the DPA attack on Stream cipher (like [Mickey-128](http://www.ecrypt.eu.org/stream/mickeypf.html)). I learned that, the attacker need to build hypothetical power consumption matrix with different initial vectors. For example: using hamming-distance model to describe the po...
This question is inspired by this [recent one][1], which raises a point that need to be made quantitative to be meaningfully discussed. I chose an unusual approach: a new question worded as homework that could be asked in a _computer security with applied cryptography_ class (please use [meta][2] for critics of that me...
I been going through some cryptography exercises and stumbled across this problem. > Discover message $m$. You know that $m = p * q$. Also $p ^ 5 \bmod N$, > $q ^ 5 \bmod N$ and $N$ are known numbers. I am really lost and don't know where to start. Could anyone give some hints or point me to right direction ...
I have stream of millions of short n-bit (n<30) messages generated by some random number generator. The source of random number generator is not available to me. I suspect there are messages used to convey information generated by some third parties and injected into the stream. I what to test the hypothesis of such...
I have stream of millions of short n-bit (n<30) messages generated by some random number generator. The source of random number generator is not available to me. I suspect there are messages used to convey information generated by some third parties and injected into the stream. I what to test the hypothesis of such...
You may be interested in reading up on the [The TESLA Broadcast Authentication Protocol][1] which uses the one-way key chain concept to achieve authentication. The basic idea of the key chain is to hash a secret key value repeatedly and use the hashes or "keys" in the reverse order for authentication. A simple examp...
The public key for RSA is [e,n]. Since n = p * q, are p and q already exposed because it takes no effort to figure out p and q from n?
We're using OpenSSLs EVP_aes_265_xts encryption on data (with unique, random, IVs for every new message encrypted) - which is working well. But, I've been asked; what is the forward cipher function of this algorithm? I was going to say it's AES256, but am having doubts as to whether that's what the actual forward ci...
What is the forward cipher function of AES-XTS?
I am experimenting with the GLV method but cannot manage to get the right results according to 'the books'. I managed to find lambda, beta, split K into k1 and k2 etc. According to the books, kP = k1 P + k2 phi(P) However, to get the right results, I need to test if k1 and k2 are of the same sign, in which cas...
I am experimenting with the GLV method but cannot manage to get the right results according to the literature. I managed to find lambda, beta, split K into k1 and k2 etc. for the curve I'm interested in. According to the literature: kP = k1 P + k2 phi(P) However, to get the right results, it seems to be needed...
> Do you want DDH/RSA-based PRFs? If so, we have them and I will answer. – xagawa > > @xagawa Yes, I want that :-) – Dingo13 I list the PRFs based on the number-theoretical assumptions. They are ``arithmetic or mathematical function.'' You can use the Feistel network to obtain (S)PRPs from PRFs in theory. ...
Building on the question and answer from http://crypto.stackexchange.com/questions/13238/addition-only-phe-in-f which ponders homomorphic cryptosystems to navigate, relatively, a single dimension without revealing absolute position (an encrypted counter?), I am now interested in extending this to multiple dimensions, t...
I am experimenting with the GLV method but cannot manage to get the right results according to the literature. I managed to find lambda, beta, split $K$ into $k_1$ and $k_2$ etc. for the curve I'm interested in. According to the literature: > $$kP = k_1P + k_2\phi(P)$$ However, to get the right results, it ...
I've previously asked questions on BN pairing parameters. Here's one more. In the BN construction, one is working in a subgroup of a curve over an extension field $\mathbf{F}_{p^{12}}$ for some prime $p$. Now, in the scheme I'm looking at, they suggest selecting parameters so that $p$ will end up being a $256$-bit ...
According to [this paper][1], > **Malleability.** We also see no relevance of "malleability" to the standard definition of signature security. Aside from the example, how is ed25519 malleable by the non-standard definition of signature security? [1]: http://ed25519.cr.yp.to/ed25519-20110926.pdf
I have two questions about OAEP for RSA. 1) How are the number of bits to pad with 0 chosen? For example, if I'm sending a 255 byte message with RSA-2048 I have 8 unused bits (1 byte). Should I split the remainder bits evenly so I pad with 4 zeroes and my `r` is 4 random bits, or do I pick the number of bits to pad ...
I have two questions about OAEP for RSA. 1) How are the number of bits to pad with 0 chosen? For example, if I'm sending a 255 byte message with RSA-2048 I have 8 unused bits (1 byte). Should I split the remainder bits evenly so I pad with 4 zeroes and my `r` is 4 random bits, or do I pick the number of bits to pad ...
I have two questions about OAEP for RSA. 1) How are the number of bits to pad with 0 chosen? For example, if I'm sending a 255 byte message with RSA-2048 I have 8 unused bits (1 byte). Should I split the remainder bits evenly so I pad with 4 zeroes and my `r` is 4 random bits, or do I pick the number of bits to pad ...
I have two questions about OAEP for RSA. 1) How are the number of bits to pad with 0 chosen? For example, if I'm sending a 255 byte message with RSA-2048 I have 8 unused bits (1 byte). Should I split the remainder bits evenly so I pad with 4 zeroes and my `r` is 4 random bits, or do I pick the number of bits to pad ...
In the public-key system RSA scheme, each user holds beyond a public modulus $m$ a public exponent, $e$, and a private exponent, $d$. Suppose that Bob's private exponent is learned by other users. Rather than generating a new modulus, Bob decides to generate just a new public and a new private exponent $e'$ and $d'$...
I have two questions about OAEP for RSA. 1) How are the number of bits to pad with 0 chosen? For example, if I'm sending a 255 byte message with RSA-2048 I have 8 unused bits (1 byte). Should I split the remainder bits evenly so I pad with 4 zeroes and my `r` is 4 random bits, or do I pick the number of bits to pad ...
1) First off, the maximum size of a message you can use is determined by the desired length of the padding (in my case, I am using RSA-2048 so I wanted a final padded length of 256 bytes) and the hash function you are using. The formula is `messageLength = desiredLength - 2 * hashOutputSize - 1` (in my case, I wante...
I have two questions about OAEP for RSA. 1. How are the number of bits to pad with 0 chosen? For example, if I'm sending a 255 byte message with RSA-2048 I have 8 unused bits (1 byte). Should I split the remainder bits evenly so I pad with 4 zeroes and my $r$ is 4 random bits, or do I pick the number of bits to pad ...
1. First off, the maximum size of a message you can use is determined by the desired length of the padding (in my case, I am using RSA-2048 so I wanted a final padded length of 256 bytes) and the hash function you are using. The formula is `messageLength = desiredLength - 2 * hashOutputSize - 1` (in my case, I want...
I have two questions about OAEP for RSA. 1. How are the number of bits to pad with 0 chosen? For example, if I'm sending a 255 byte message with RSA-2048 I have 8 unused bits (1 byte). Should I split the remainder bits evenly so I pad with 4 zeroes and my $r$ is 4 random bits, or do I pick the number of bits to pad ...
According to the paper “[High-speed high-security signatures][1]”… > **Malleability.** We also see no relevance of "malleability" to the standard definition of signature security. Aside from the example, how is ed25519 malleable by the non-standard definition of signature security? To be more specific: I'...
I've previously asked questions on BN pairing parameters. Here's one more. In the BN construction, one is working in a subgroup of a curve over an extension field $\mathbf{F}_{p^{12}}$ for some prime $p$. Now, in the scheme I'm looking at, they suggest selecting parameters so that $p$ will end up being a $256$-bit ...
The public key for RSA is $[e,n]$. Since $n = p * q$, are $p$ and $q$ already exposed because it takes no effort to figure out $p$ and $q$ from $n$?
I am experimenting with the GLV method but cannot manage to get the right results according to the literature. I managed to find lambda, beta, split $K$ into $k_1$ and $k_2$ etc. for the curve I'm interested in. According to the literature: > $$kP = k_1P + k_2\phi(P)$$ However, to get the right results, it ...
I haven't been programming much lately, so I figured I would make an encrypted instant-messaging program (read: Skype clone) with groups to hone my skills. That's not important though, I can do that. The problem is that I know almost nothing about cryptography, so I figured I'd ask here so I don't discover down the roa...
looks like NIST only approved GCM mode for authenticated encryption and other modes don't have any approval or a good implementation available. - Is that possible a weakness in $GHASH$ compromise plain-text or it just allow attacker to forge it? can we use AES-GCM with confidence or is better to use a confidential ...
My question is about the key length of a asymetric algorithm. How is it possible to memorize or remember a key that is about 4000 bits long?
Does it make sense to have a 4000 bit long key?
> How is it possible to memorize or remember a key that is about 4000 bits long? One could reasonably ask the same question about AES: how is it possible to remember a key that is 128 bits long? The answer is: "it doesn't really matter, because no one actually tries to remember a sequence of 128 random bits, much...
IMO, I think the very first question before diving into designing the protocol would be to ask yourself what kind of secure communication do you want? Namely, there are 2 to consider: **client-server secure communication** & **end-to-end secure communication** between the IM users. For the *client-server secure comm...
I think the very first question before diving into designing the protocol would be to ask yourself what kind of secure communication do you want? Namely, there are two options to consider when it comes to communication between the IM users: 1. For the **client-server secure communication**, there are two directions ...
I am designing some cryptographic protocols and I am new to it. Are there any well-known tools that can be used to model and design these protocols? And also verify or analyze their validity? If not a tool, is there any popular approach or formal method to design and analyze crypto protocols that are widely accep...
Trying to find related answer for a long time, but not convinced yet. What I am trying is to encrypt using RijndaelManaged. To create Key, I am passing password, salt and iteration to Rfc2898DeriveBytes. I was thinking to add constant if user entered password is below specific length before passing it to Rfc2898D...
In terms of the frequency of letters, how is it possible to have different frequent letters when the length of the text I'm analyzing is shorter? At the moment, I'm comparing the frequencies of a long text and a subtext from that text. To my surprise, the most frequent letters changed. In the long one it was the letter...
Frequency of letters change by the length of the texts?
Trying to find related answer for a long time, but not convinced yet. What I am trying is to encrypt using `RijndaelManaged`. To create Key, I am passing password, salt and iteration to `Rfc2898DeriveBytes`. I was thinking to add constant if user entered password is below specific length before passing it to `Rfc...
I'm not sure what SSL uses to share the symmetric key to both end users, i.e. at the beginning of the communication. Is it RSA? Or El-Gamal? Or something else?
If the GCD(r, p-1) is small and the value k is used to sign a message using [ElGamal](http://en.wikipedia.org/wiki/ElGamal_signature_scheme) is also small. Then the secret value of x can be determined. Why is this true? How would one retrieve x?
I am trying to implement ElGamal in java without using the in-built libraries. The problem occurs when I am trying to find the generators of the number(in this case 11). Everything works perfectly except that it is returns 10 as a valid generator of 11(which it is not, right?) public void generateKey() { ...
I ask about ElGamal algorithm. Is ElGamal algorithm used new key for each encryption process. in other word it should we use new key for each chunk? For example, if we have message that has four block each block less than $P$. Where $P$ is the prime number used in ElGamal. How many keys should be used to encrypt this m...
Does ElGamal Encryption create a different key for each block sent?
I am trying to calculate an $x$, such that $t = g^x \pmod p$ in order to crack a weak ElGamal encryption for university. I found GDlog, but I cant figure out how I can use the input to calculate my $x$. Here is what we got (from gdlogs example code): p:1000000000000000000000000000057 //prime number, modu...
Sometimes the easiest way to describe security of a type of cryptography is to say that "the time it takes to solve for an x-bit key would be y years". How would one go about doing such a calculation for RSA, DH, and ElGamal. In other words, given x, how to solve for y?
Let's say, we have a large number $n=181937053$ and $f(x)=x^2+1$. And also we know that $n=12391 \times 14683$. The problem is that ,using Pollard rho method, can we find the algorithm iteration times need to factor this number? ($x_0,y_0 = 2$)
Given a key K (The key is fixed) and a nonce N (changes from one message to another) Using a secure Key derivation function (KDF) such as the ANSI-X9.63-KDF with SHA-1 option to derive a key for encryption Can we reach the IND-CPA security level for our encryption ?
Given a key $K$ (the key is fixed) and a nonce $N$ (changes from one message to another) Using a secure Key derivation function (KDF) such as the ANSI-X9.63-KDF with SHA-1 option to derive a key for encryption Can we reach the IND-CPA security level for our encryption ?
I'm looking for a way to perform encrypted nightly backups of a server I administer, without storing the decryption key on the server. A form of PK encryption seems ideal for this, as I can store the public key on the server, and the private key somewhere else private (like on a post-it attached to my monitor, or fo...
So I wrote a simple encryption algorithm (Not very secure, just a starting point. I don't want criticism on it.) and I have been having trouble finding a way to decrypt the text. The algorithm is here (You may need an ASCII table to understand it): Key = key DecimalKey: k + e + y = 107 + 101 + 121 = 329 / 3(Lengt...
So I wrote a simple encryption algorithm (Not very secure, just a starting point. I don't want criticism on it.) and I have been having trouble finding a way to decrypt the text. The algorithm is here (You may need an ASCII table to understand it): Key = key DecimalKey: k + e + y = 107 + 101 + 121 = 329 / 3...
So these days I see everyone using AES-GCM. What are its advantages over simple CTR+HMAC modes? Is it speed? Or ciphertext length? And what are the security tradeoffs, both in terms of practical cryptanalysis and theoretical attacks complexity?
In the [Identity-based cryptography][1], the user's private key in the systems is delivered by the key generation center(KGC). My question is : Is it meaningful to consider the leakage of master key of KGC? And further, if this happens, then can I think that all the user's private keys disclose? [1]: http://en...
Is it meaningful to consider the leakage of master key of KGC?
>Is it meaningful to consider the leakage of master key of KGC? Yes. $\:$ That is _mainly_ relevant when the KGC might be able to "securely forget" <br> some user private keys, such as via [forward security](http://download.springer.com/static/pdf/913/chp%253A10.1007%252F978-3-642-24999-0_9.pdf?auth66=1393823970_f...
Note: I am not a cryptographer at all, I am familiar with the basic concepts of cryptography I am always on the look out for privacy enhancing technologies. I stumbled upon the service from unseen.is. I had a look at their site (specifically [here](https://unseen.is/#p2) and even though I lack knowledge there are a...
I'm implementing (for learning purposes) a file encryptor, which uses the following method (from http://en.wikipedia.org/wiki/Encrypting_File_System). I have 3 kind of keys: RSA public/private, AES and a user key derived from a phrase. - encrypt the file with AES (I use OFB mode). - encrypt the AES key with RS...
> "In terms of the frequency of letters, how is it possible to have > different frequent letters when the length of the text I'm analyzing > is shorter?" Well, if you analize the famous "The quick brown fox jumps over the lazy dog" you can't expect a frequency analysis to perfect match with big texts analysis. ...
>Is it meaningful to consider the leakage of master key of KGC? Yes. $\:$ That is _mainly_ relevant when the KGC might be able to "securely forget" <br> some user private keys, such as via [forward security](http://download.springer.com/static/pdf/913/chp%253A10.1007%252F978-3-642-24999-0_9.pdf?auth66=1393823970_f...
I argue it is because there should be no more correlation between the outputs $G(s0^{|s|})$ than between the outputs $G(s)$. Thus we can say the G'(s) is a PRNG that satisfies $|G'(s)| \geq 4|s|$. If we let $s' = s0^{|s|}$ and denote the set of all s' by S', then s' should be chosen uniformly at random from S'. Since, ...
In the [Identity-based cryptography][1], the user's private key in the systems is delivered by the key generation center(KGC). My question is : Is it meaningful to consider the leakage of master key of KGC? And further, if this happens, then can I think that all the user's private keys disclose? **supplementary pa...
I argue it is because there should be no more correlation between the outputs $G({s_0}^{|s|})$ than between the outputs $G(s)$. Thus we can say the $G'(s)$ is a PRNG that satisfies $|G'(s)| \geq 4|s|$. If we let $s' = {s_0}^{|s|}$ and denote the set of all $s'$ by $S'$, then $s'$ should be chosen uniformly at random fr...
I argue it is because there should be no more correlation between the outputs $G(s0^{|s|})$ than between the outputs $G(s)$. Thus we can say the G'(s) is a PRNG that satisfies $|G'(s)| \geq 4|s|$. If we let $s' = s0^{|s|}$ and denote the set of all s' by S', then s' should be chosen uniformly at random from S'. Since, ...
In terms of the frequency of letters, how is it possible to have different frequent letters when the length of the text I'm analyzing is shorter? At the moment, I'm comparing the frequencies of a long text and a subtext from that text. To my surprise, the most frequent letters changed. In the long one it was the le...
Suppose I've got two clients $A$ and $B$. Client $A$ encrypts data in CTR (Counter) mode to get a ciphertext. What information will client $B$ have to receive from $A$ to decrypt the ciphertext? Just the “key”, “IV” (nonce), and “counter start value”?
Note: I am not a cryptographer at all, I am familiar with the basic concepts of cryptography I am always on the look out for privacy enhancing technologies. I stumbled upon the service from unseen.is. I had a look at their site (specifically [here](https://unseen.is/#p2) and even though I lack knowledge there are a...
I am always on the look out for privacy enhancing technologies. I stumbled upon the service from unseen.is. I had a look at their site (specifically [here](https://unseen.is/#p2)) and even though I lack knowledge there are a few early warning signs: > a former security contractor told us "if it's publicly available,...
I'll comment only the statement referring to an AES-256 replacement with 4096-bit key: > According to our engineers, this will take 23840 times longer to crack than aes256 Bob writing that is not able to correctly transcribe even the numbers that engineer Alice allegedly spelled: most likely, $23840$ is intended to...
I'll comment only the statement referring to an AES-256 replacement with 4096-bit key: > According to our engineers, this will take 23840 times longer to crack than aes256 Bob writing that is not able to correctly transcribe even the numbers that engineer Alice allegedly spelled: most likely, $23840$ is intended to...
I argue it is because there should be no more correlation between the outputs $G(s0^{|s|})$ than between the outputs $G(s)$. Thus we can say the $G'(s)$ is a PRNG that satisfies $|G'(s)| \geq 4|s|$. If we let $s' = s0^{|s|}$ and denote the set of all $s'$ by $S'$, then $s'$ should be chosen uniformly at random from $S'...
If $G'(s)=G(s0^{|s|})$ and $G$ is a PRNG, is $G'$ necessarily a PRNG?
I'll comment only the statement referring to an AES-256 replacement with 4096-bit key: > According to our engineers, this will take 23840 times longer to crack than aes256 Bob writing that is not able to correctly transcribe even the numbers that engineer Alice allegedly spelled: most likely, $23840$ is intended to...
I am currently developing a messaging application that uses rsa end to end encryption. The client generates permanent rsa keys, and sends the public key to my server for account management. As it currently is, my program will take any keys, without validation. This is a big security risk, so I need to validate the keys...
Check the validity of a rsa key pair with only the public key?
While there are some obvious checks you can do, you can't cover everything: - You can check that the modulus is a composite odd number of the appropriate size - If you want to put in the effort, you can do a quick check if the modulus has any small factors - You can check if the public exponent is an odd numbe...
I recently stumbled across https://eprint.iacr.org/2013/229.pdf "How to Run Turing Machines on Encrypted Data" Given that it's now possible to run _turing machines_ on encrypted data, what open problems remain in the realm of Functional Encryption? (It seems like for every problem in Functional Encryption, one wo...
I recently stumbled across ["How to Run Turing Machines on Encrypted Data"](https://eprint.iacr.org/2013/229.pdf). Given that it's now possible to run _turing machines_ on encrypted data, what open problems remain in the realm of Functional Encryption? (It seems like for every problem in Functional Encryption, on...
From many readings, I got to know that TLS generates master shared secret using pre-master keys and uses DH algorithm to generate the shared secret/Master secret. What values during hello messages act as 1. P - Prime number 2. G - Generator 3. Secret primes owned by each parties Why it needs client-server ra...
how TLS generates shared secret?
From many readings, I got to know that TLS generates master shared secrets using pre-master keys and uses the DH algorithm to generate the shared secret/Master secret. What values during the hello messages act as <br> 1. P - Prime number <br> 2. G - Generator <br> 3. Secret primes owned by each parties <br>?...
How does TLS generate the shared secret?
Machine Learning is sometimes associated with cryptography. Many of such cross field studies have been majorly done in use of machine learning for cryptanalysis/decryption. I am interested in knowing that can machine learning be used in anyway for encryption. Googling it did not give any relevant results. Are there any...
What RC4 key value will completely invert $S$ after the initial permutation, so that $S[0] = 255, S[1] = 254, …, S[254] = 1, S[255] = 0$?
What RC4 key value will completely invert $S$ after initial permutation?
I have a game that I am developing which uses a locally-stored internal database. It does not matter to me whether a user can read the file (which, to me, means I don't need a symmetric cipher), but I don't want it to be possible for a user to alter it without completely breaking the game (essentially, to make cheating...
Can I use asymmetric encryption for more powerful write-protection?
Reading the latest [TLS weakness](https://secure-resumption.com/), it seems that multiple weaknesses have been found over the years caused by not ensuring that messages are sent over the same channel, and in general a lack of cryptographic bindings between messages and layers. I wonder if there is some general rule ...
Should layered use of crypto always have a cryptographic binding between the layers?