instruction
stringlengths
15
30k
Can I simulate iterated AES-ECB with other block cipher modes?
My software uses a 3rd party encryption appliance. One of the capabilities they allow is for the client software to supply an IV. **Why would they not generate a random number on their own to use as an IV?** What is the advantage of letting the client specify an IV? I can only think of disadvantages, such as pe...
Why would an Initialization Vector be supplied externally?
By the end of 2009, [RSA-768][3] has been cracked using the [special number field sieve][4]. This exploit forced RSA algorithms to have a key length not inferior to 512 bits (or 154 decimal numbers). This means that the generated prime numbers you are talking about must have at least 154 decimal numbers too. So the que...
The RSA public key encryption requires two very large prime numbers as part of its encryption process that serve as secrets. These are typically generated with cryptographically secure random number generators of some kind. However, random number generators generate random bits; they don't specifically generate prim...
How are random numbers for RSA generated?
On page 46 of [these lecture notes](http://www.icg.isy.liu.se/courses/tsit03/forelasningar/cryptolecture04.pdf), it seems to say that if we have a Feistel cipher, and plaintexts $(L_0, R_0)$ and $(L_0^*, R_0^*)$ with corresponding encryptions, then we can determine the key? But isn't this not the case by Luby-Rackoff? ...
If I have a Merkle chain of 3 items, is it possible to create a zero knowledge proof of the existance of a correct chain between hash 1 and hash 3?
Is there a way to "shorten" a Merkle chain?
If I have a Merkle chain of 3 items, is it possible to create a zero knowledge proof of the existance of a correct chain between hash 1 and hash 3? Editing to clarify (Thanks Ricky), what I mean my a Merkle chain is: hash(foo) = A1 -> hash(bar + A1) = B2 -> hash(baz + B2) = C3 An ordered ...
I'm trying to digitally sign a document which is uploaded by user. I want user to sign that document using his DSC. Do I have to : Transfer the file over network or Transfer the Private key of user to sign at remote server? Which is better or any other way to do it?
Is it required to transfer private key to programatically digital sign a Document remotely?
Is it possible to get the same output in DES while the inputs are different using the same key ? ( not a weak key). If yes please give me a hint how to show that. (a specific S-BOX to work with ?) If no, why ? Thank you
No, that is impossible. The reason is simple: How would you decrypt this? If you input the ciphertext and the key into the decryption function, than you have to get exactly one output, not two. How would you decide which output is the correct one? The DES encryption and decryption functions are bijective under one g...
No, that is impossible. The reason is simple: How would you decrypt this? If you input the ciphertext and the key into the decryption function, than you have to get exactly one output, not two. How would you decide which output is the correct one? The DES encryption and decryption functions are bijective under one g...
No, that is impossible. The reason is simple: How would you decrypt this? If you input the ciphertext and the key into the decryption function, than you have to get exactly one output, not two. How would you decide which output is the correct one? The DES encryption and decryption functions are bijective under one g...
Is it possible to get the same output for DES while the inputs are different while using the same key? The key should not have to be a weak key. If yes could you give me a hint how to show how to do this? Is there a specific S-BOX to work with? If this cannot be done, then why is it considered impossible?
By the end of 2009, [RSA-768][3] has been cracked using the [special number field sieve][4]. This exploit forced RSA algorithms to have a key length not inferior to 512 bits (or 154 decimal numbers). This means that the generated prime numbers you are talking about must have at least 154 decimal numbers too. So the que...
Hello I am working on implementing a message to elliptic curve point mapping hardware circuit I have done some research and found out the koblitz mapping method: I will be using a field of binary polynomials F(2^163) the equation will be of the form of : y^2 + xy = x^3 + x^2 + 1 ![Message to point mapping][...
My software uses a 3rd party encryption appliance ([DataSecure][1]). One of the capabilities they allow is for the client software to supply an IV while doing CBC encryption. **Why would they not generate a random number on their own to use as an IV?** What is the advantage of letting the client specify an IV? ...
Reading a book on cryptography by Douglas R. Stinson I've met the following proof, which is stated without proof: (see: http://books.google.dk/books?id=Yz55lPEuzckC&pg=PA119&source=gbs_toc_r&cad=4#v=onepage&q&f=false) ![enter image description here][1] [1]: https://i.stack.imgur.com/QcJHV.png Is no proof g...
I'm trying to digitally sign a document which is uploaded by a user. I want the user to sign that document using his digital signing certificate (DSC). Should I: * transfer the file to the user, and have them sign it on their own system, or * transfer the user's private key to the server, and sign the file t...
Do I have to transfer the private key to digitally sign a remote document?
Given the scenario in which I want to send 10 messages either to Stalio or Olio, I sign this messages with their public keys before sending using RSA plain. Can someone by knowing only the public keys of Stalio and Olio and the 10 cipher texts knowing which of them is addressed to who ? Thanks
I'll try to give additional explanation on algebraic number and the link with EC. Let $q=2^{163}$ the finite Field $F_q=GF(q)$, as selected by NIST has some features for doing cryptography. This field has been generated with the irreduccible pentanomial you gave in the table. To understand what the trace of the pol...
I'll try to give additional explanation on algebraic number and the link with EC. Let $q=2^{163}$ the finite Field $F_q=GF(q)$, as selected by NIST has some features for doing cryptography. This field has been generated with the irreduccible pentanomial you gave in the table. To understand what the trace of the pol...
We know that the Key were generated by **2 16Bit LFSRs** (output of both is XORed together -> key) I already extracted a **64 Bit key sequence**, but how can I calculate the **polynom of the LFSRs** (and the initialisation vector)? Since we have 2 LFSRs XORed together which means its non-lineary I can't use a Matrix...
A High School math teacher in the Bronx asked me if I knew of any way to use cryptography in a way that motivates students (15 to 18 years old) to learn math. I do know that many of them want to protect (encrypt) Snapchat pictures, and understand how SSL and encryption "works". Is anyone aware of a curriculum, ...
What cryptography is suitable to motivate High School students to learn math?
With the advancement of technology in quantum computing, it's becoming more evident that we need to start thinking about protecting the future integrity of our cryptographic standards. What can we do on binary computers to prevent attacks on cryptographic related items such as password hashes, private keys, and asymme...
Reading a book on cryptography by Douglas R. Stinson I've met the following theorem, which is stated without proof (see [here](http://books.google.dk/books?id=Yz55lPEuzckC&pg=PA119&source=gbs_toc_r&cad=4#v=onepage&q&f=false)). Thereby, $\mathcal{F^{X,Y}}$ denotes the set of all functions from $\mathcal{X}$ to $\math...
is it possible to get the same output from one F-function in DES giving 2 different inputs using the same key. I give the F-function input 1 with Key 'K', it goes through the S-boxes and it gives an output1. I give the F-function input 2 with the same Key 'K', it goes through the S-boxes and it gives an output2. c...
Was wondering if we have any (or can we come up with) "units" for strength of encryption like in Physics. Most of our comparative analysis of encryption schemes are based on number of S boxes or number of rounds or proofs in a particular model or some times even performance of algorithms. Is it possible at all for ...
Can we quantify strength of encryption scheme ?
Hello I am working on implementing a message to elliptic curve point mapping hardware circuit I have done some research and found out the koblitz mapping method: I will be using a field of binary polynomials F(2^163) the equation will be of the form of : $$ y^2 + xy = x^3 + x^2 + 1 $$ ![Message to point mappi...
Looking at [getDefaultPRNG() in java.security.SecureRandom][1] makes me very unsure about how to use it. On my desktop, it uses [sun.security.provider.NativePRNG][2], which reads from [`/dev/random` and/or `/dev/urandom`][3] which should be effectively unpredictable if you don't have direct access to the operating sys...
Looking at [getDefaultPRNG() in java.security.SecureRandom][1] makes me very unsure about how to use it. On my desktop, it uses [sun.security.provider.NativePRNG][2], which reads from [`/dev/random` and/or `/dev/urandom`][3] which should be effectively unpredictable if you don't have direct access to the operating sys...
Looking at [getDefaultPRNG() in java.security.SecureRandom][1] makes me very unsure about how to use it. On my desktop, it uses [sun.security.provider.NativePRNG][2], which reads from [`/dev/random` and/or `/dev/urandom`][3] which should be effectively unpredictable (non-deterministic) if you don't have direct access ...
Looking at [getDefaultPRNG() in java.security.SecureRandom][1] makes me very unsure about how to use it. On my desktop, it uses [sun.security.provider.NativePRNG][2], which reads from [`/dev/random` and/or `/dev/urandom`][3] which should be effectively unpredictable (non-deterministic) if you don't have direct access ...
I'll try to give additional explanation on algebraic number and the link with EC. Let $q=2^{163}$ the finite Field $F_q=GF(q)$, as selected by NIST has some features for doing cryptography. This field has been generated with the irreduccible pentanomial you gave in the table. To understand what the trace of the pol...
What is the exact difference between ABE and ABBE ? Also is broadcast encryption on top of ABE is equivalent to ABBE ?
I'll try to give additional explanation on algebraic number and the link with EC. Let $q=2^{163}$ the finite Field $F_q=GF(q)$, as selected by NIST has some features for doing cryptography. This field has been generated with the irreduccible pentanomial you gave in the table. To understand what the trace of the pol...
What is the exact difference between [attribute-based encryption (ABE)](http://en.wikipedia.org/wiki/Attribute-based_encryption) and attribute-based broadcast encryption (ABBE)? Is ABBE equivalent to broadcast encryption on top of ABE?
I'm reading [“Identity-Based Broadcast Encryption with Constant Size Ciphertexts and Private Keys”](http://link.springer.com/content/pdf/10.1007%2F978-3-540-76900-2_12.pdf) by Cécile Delerablée. On page 207, the encryption process needs $\gamma$ which is part of the master key. This does not make sense to me. I...
Is it possible for two different half-block inputs to the [DES F-function](//en.wikipedia.org/wiki/Data_Encryption_Standard#The_Feistel_.28F.29_function), with the same round subkey, to produce the same output? That is, if we feed two different half-block inputs $b_1$ and $b_2$ through the expansion stage, XOR the...
Is the DES F-function injective for a given subkey?
Looking at [getDefaultPRNG() in java.security.SecureRandom][1] makes me very unsure about how to use it. On my desktop, it uses [sun.security.provider.NativePRNG][2], which reads from [`/dev/random` and/or `/dev/urandom`][3] which should be effectively unpredictable (non-deterministic) on Linux if you don't have direc...
I am solving discrete logarithm problem mod N. N is composite number, i found its factors - lot of small primes and two big primes (> 2^50). Does the factorization of N somehow help me? I think I could compute the logarithm modulo each prime and then combine it, but do not know how exactly. Seems similar like problems...
Given the scenario in which I want to send 10 messages either to Stalio or Olio. I encrypt these messages with their respective public keys using textbook RSA, before sending the messages to their recipients. Can an attacker - by knowing only the public keys of Stalio and Olio and the 10 cipher texts - tell which of...
Given the scenario in which I want to send 10 messages either to Stalio or Olio. I encrypt these messages with their respective public keys *using textbook RSA*, before sending the messages to their recipients. Can an attacker - by knowing only the public keys of Stalio and Olio and the 10 cipher texts - tell which ...
I was researching about how to encrypt with RSA. I understood everything but no the keys (private keys). In the phpseclib (RSA in php) you can import your private key (private.key format) and in the key theres is text like this: -----BEGIN RSA PRIVATE KEY----- MIIBOQIBAAJBAIOLepgdqXrM07O4dV/nJ5gSA12jcjBeBXK5mZO7...
I was researching about how to encrypt with RSA. I understood everything but not the keys (private keys). In the phpseclib (RSA in php) you can import your private key (private.key format) and in the key theres is text like this: -----BEGIN RSA PRIVATE KEY----- MIIBOQIBAAJBAIOLepgdqXrM07O4dV/nJ5gSA12jcjB...
Copy / paste that key into http://phpseclib.sourceforge.net/x509/asn1parse.php and you'll see that there are several different integers in there. p is there, q is there as is the exponent and several other integers to speed things up by taking advantage of the Chinese Remainder Theorem. The key is encoded using DER ...
The following highlighted text must contains **"547a5e0e008be33730158d63ce844e67"** data. I don't know about encryption method and key. Is it possible to decrypt it? ![enter image description here][1] [1]: https://i.stack.imgur.com/yulXL.png Or just give me some idea about encryption method that they us...
Is it possible to decrypt this message with partially known data?
> Does the factorization of N somehow help me? It sure does. > I think I could compute the logarithm modulo each prime and then combine it, but do not know how exactly. Seems similar like problems for Chinese remainder theorem but I cannot find the way how to do it. You're real close; you do recombine them usi...
The standard HMAC function, $H(K, m)$, authenticates a single message $m$. Instead, I'd like to authenticate 2 messages, like this: $$H'(K, m_1, m_2)$$ The simplest solution, $H(K, m_1||m_2)$, confuses e.g. `"ab"+"cd"` or `"abc"+"d"` as messages. Would this be secure instead: $H(H(K, m_1), m_2)$?
I have RTS game, where all players run game and server just relays messages. Game can generate and store text file on player pc. I want to allow some players to be mods, so I need to sign or encrypt their ids + number representing their permissions. Problems: -everyone knows permissions and ids of other players. -...
I have RTS game, where all players run game and server just relays messages. Game can generate and store text file on player pc. I want to allow some players to be modernators, so I need to sign or encrypt their ids + number representing their permissions. Problems: -everyone knows permissions and ids of other play...
Is there any (current) cryptosystem or digital signature or cryptographic primitive that uses the BBS PRG in order to generate its secret keys?
Is BBS used for generation of keys for any modem cryptosystem?
Reading the SIV RFC https://tools.ietf.org/html/rfc5297#page-9, I found that the S2V function starts by calculating the MAC of a "zero" block, doubles it and then XORs further data to the result. Now looking at the BouncyCastle implementation, the exact same thing happens during the initialization of AES-CMAC. Ho...
Is AES_CMAC specified to double ciphered zeroes during initialization?
Are there cryptographic hash functions which do not have any collisions?
> Do I have to do all the "zero" stuff and doubling and XORing? If you are implementing the S2V primitive, using an AES-CMAC function, then yes, you will need to do all that "zero" stuff and doubling and XORing. Yes, if you peek inside the AES-CMAC function, you will find some logic that looks sort of like this; ...
Let suppose that we have to check a message that was written one second ago. The message is discarded immediately afeter having being checked. What "minimal" size for such a MAC is secure ? Thank you.
Size of a MAC for a quickly checked message?
I have RTS game, where all players run game and server just relays messages. Game can generate and store text file on player pc. I want to allow some players to be moderators, so I need to sign or encrypt their ids + number representing their permissions. Problems: - everyone knows permissions and ids of other pl...
I am aware of the requirement of an IV to be unique in CTR mode (http://crypto.stackexchange.com/questions/2991/why-must-iv-key-pairs-not-be-reused-in-ctr-mode). However I wonder if I can use an IV depending on the plaintext deterministically. This means, of course, that the whole encryption is deterministic, which is ...
Say, I salt my key(K) with y. So, my new Key is K' = Salt(K+y). Now, Alice sends commitment = E[K',M] to Bob. Bob knows the salt(y), but not K nor K'. Can Bob decrypt the message?
If I know the salt, can I decrypt the commitment?
I am aware of the requirement of an IV to be unique in CTR mode (http://crypto.stackexchange.com/questions/2991/why-must-iv-key-pairs-not-be-reused-in-ctr-mode). However I wonder if I can use an IV depending on the plaintext deterministically. This means, of course, that the whole encryption is deterministic, which is ...
I know that some (advanced) smart cards or tokens allow generating key pair directly on the device, but I wonder how the card can gather entropy during the process. Any idea ?
I think I understand the mathematics of RSA ok. I'm not so computer savvy though. How, exactly, can I extract n, e, d, p, and q from a PGP RSA public key pair? Is there like a converter online? What exactly is the language used when you see a PGP key? Is it base 64 or something? So, for example (and I am well aware ...
How exactly to extract information base 10 from a PGP RSA key pair?
So normally if you do encrypt('a') twice in a row you'll get the same result. But sometimes (as is the case in SSH) this is not desirable. You want encrypt('a') + encrypt('a') == encrypt('aa'). What is this called? PHP does it with mcrypt: <?php $mcrypt = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_C...
what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?
I think I understand the mathematics of RSA ok. I'm not so computer savvy though. How, exactly, can I extract $n$, $e$, $d$, $p$ and $q$ from a PGP RSA public key pair? Is there like a converter online? What exactly is the language used when you see a PGP key? Is it Base64 or something? So, for example (and I am wel...
While solving a (easy...) Project Euler cipher problem this week I repeatedly saw instructions for breaking ciphers after identifying the keylength as: > 'shift the ciphertext by that key length and XOR it with itself. This > removes the key and leaves you with plaintext XORed with the plaintext > shifted the leng...
Well, if we have plaintext^shiftedPlaintext, what we have is the values $P_i \oplus P_{i+k}$, where $k$ is the length of the shift. What does this imply? Well, if we consider the values $P_i \oplus P_{i+k}$, $P_{i+k} \oplus P_{i+2k}$, $P_{i+2k} \oplus P_{i+3k}$, ... we get a chain where, if we guess one of the valu...
as always we are trying to improve password storage; before just adding new ways of storing our password we need to define what treats we will mitigate by adding in a new way to store our password. currently we store passwords with HMAC (using SHA-1), individual salts generated with PRNG (RSA X 9.31)function, the HM...
As always we are trying to improve password storage; before just adding new ways of storing our password we need to define what threats we will mitigate by adding in a new way to store our password. Currently we store passwords with HMAC (using SHA-1), individual salts generated with a PRNG <br> (RSA X 9.31) funct...
I'm new to GCM and I need to implement it in hardware, using FPGA. The data bus is 640 bits, so I will use 5 adder/multiplier blocks in parallel. The message size and AAD size are constant. My design have a particularity that AAD and Len A||C are available only at the end of message and I don't kow how to process it...
http://en.wikipedia.org/wiki/Baby-step_giant-step I am trying to use the Baby Step Giant Step algorithm to find discrete logarithm in: $$a^x= B (mod \;p)$$ with using BSGS : $$x = im+j$$ $$a^j = B *a^{-im}$$ where $$m = \sqrt(n)$$ Wikipedia says : A cyclic group of order p, having a generator α ...
> **Definition**: (The generalized Diffie-Hellman problem) >Let $n=pq$ for two large primes $p,q$. Given $x, x^a, x^b,n$, find $x^{ab}\pmod{n}$. (1) Is there a known reduction from the GDH problem to the RSA problem (i.e. finding $m$ from $m^e\pmod{n}$)? (2) Is there a known reduction from the GDH problem to i...
http://en.wikipedia.org/wiki/Baby-step_giant-step I am trying to use the Baby Step Giant Step algorithm to find discrete logarithm in: $$a^x= B (mod \;p)$$ with using BSGS : $$x = im+j$$ $$a^j = B *a^{-im}$$ where $$m = \sqrt(p)$$ Wikipedia says : A cyclic group of order p, having a generator α ...
WRT the selected answer here: http://crypto.stackexchange.com/questions/13077/can-curve25519-keys-be-used-with-ed25519-keys Is there any c# implementation of this or equivalent? Thanks.
http://en.wikipedia.org/wiki/Baby-step_giant-step I am trying to use the Baby Step Giant Step algorithm to find discrete logarithm in: $$a^x= B (mod \;p)$$ with using BSGS : $$x = im+j$$ $$a^j = B *a^{-im}$$ where $m = \sqrt(p)$ Wikipedia says : A cyclic group of order p, having a generator α an...
Apart from obvious performance considerations, **is there any mathematical or crypto reasons that imply that we sign a hash rather than a raw content ?** I read that it was because the hash must fit in the modulo size, but on the reverse when one encrypt with a public key RSA, the "size" doesn't seem to be a problem...
RSA - Why should we sign hash rather than raw content?
How can I benchmark RSA operations on my computer? I want to know about 4096-bit long keys on general computers. How many encryptions and decryptions are possible per second? All benchmarks I found only show 1024- and 2048-bit keys.
My question is how to calculate the <code>0x02</code> value of AES S-Box? I followed [this][1] [1]: http://crypto.stackexchange.com/questions/10996/how-are-the-aes-s-boxes-calculated/ explanation, but my answer is not correct. <code>0x02</code> is 00000010 Input = 0 0 0 0 0 0 1 0 (LSB First) Ro...
How are calculated numbers in AES S-box?
The [diagram][1] below illustrates the process of [digitally signing](http://en.wikipedia.org/wiki/Digital_signature) a message with RSA: [![Image][2]][1] As diagram shows, the message is first hashed, and the signature is then computed on the hash, rather than on the full message. Why hash the data before sig...
Why hash the message before signing it with RSA?
How does ECDH arrive on a shared secret?
Let's assume that everyone agreed on some elliptic curve and a public base point $g$ somewhere on the curve. Now, if two parties Alice and Bob want to agree on a shared secret, they proceed as follows: - Alice chooses some random number $a$ and applies the curve operation to $g$, the public base point, $a$ times....
Let's assume that everyone agreed on some elliptic curve and a public base point $g$ somewhere on the curve. When two parties Alice and Bob want to agree on a shared secret, they proceed as follows: - Alice chooses some random number $a$ and applies the curve operation to $g$, the public base point, $a$ times. She ...
I've been studying message authentication codes and I was wondering why a MAC can only be produced with AES in CBC and CFB mode and why not the other modes such as ECB, OFB and counter. Why are CBC and CFB suitable modes to produce MACs? Is there a certain trait that makes them special when compared to the other mod...
Why are there no MACs inspired by block cipher modes other than CBC and CFB?