instruction
stringlengths
15
30k
As I gather, a normal practice for choosing a cyclic group for ElGamal key generation is to find a [safe prime](http://en.wikipedia.org/wiki/Safe_prime) $p$ and use a multiplicative cyclic group with modulus $p$ and order $q = (p-1)/2$. However, generating safe primes of a large length can be quite time-consuming. Woul...
I have two ciphertexts, I suppose that its RC4 with reused key. I have XORed both ciphertexts and obtained message containing combined cleartexts. I suppose that the underlaying messages are written in some structured format, but unfortuanatelly I do not know anything about frequencies (I might guess that there will...
A paper states: ... $(p,g,y)$ is a correct ElGamal public key if $g^x=y \in \mathbb{G}$. To verify this the order of g, and thus the factorization of $p − 1$, is needed. This is easy for safe primes (i.e., primes p for which $\frac{p − 1}{2}$ is prime), but may be hard otherwise .... Why is it "easy to fac...
What does this mean?
A paper states: > [...] $(p,g,y)$ is a correct ElGamal public key if $g^x=y\in\mathbb G$. To verify this the order of $g$, and thus the factorization of $p-1$, is needed. This is easy for safe primes (i.e., primes $p$ for which $\frac{p-1}2$ is prime), but may be hard otherwise [...] Why is it "easy to factorize...
Why is factoring $p-1$ easy when $p$ is a safe prime?
I am currently trying to make an implementation of the ElGamal encryption for educational purposes. As I understand it, when using the encryption with multiplicative cyclic groups, one generates a cyclic group for a safe private key as follows: 1. Find a safe prime number $p$ (of the form $p = 2*q + 1$ where $q$ is ...
Rivest and Shuldt proposed a new sponge like cipher algorithm called Spritz: http://people.csail.mit.edu/rivest/pubs/RS14.pdf In this paper they say that the strength of the cipher is related to the bit-capacity of its sponge-like internal function. They calculate this as 936 bits from 5 8-bit registers and 112 b...
RSA has not been cracked. No one has demonstrated practically viable computing that's anywhere in the realm of breaking RSA. There is no reason to change any of your practices. The first thing to understand is that D-Wave has a long history of [repeatedly making bogus claims to the popular press](https://www.tech...
I understand that by definition one-time-pad keys cannot be reused but I was thinking about the case where it is used to send random data and couldn't find anything on the subject so here is my idea: Sending y-bits of data using x-bits of random data as a key where y > x. Step 1: Both parties agree on a x-bits ke...
How do you represent integers on a computer? In binary format: $$71_{dec} = 100\,0111_{bin} $$ How do we represent letters on a computer? (Mostly) in [ASCII][1] format (and ASCII is in binary): $$\text{A} = 100\,0001_{bin}$$ How do we represent more than one letter on a computer? We concatenate the seperate...
I am currently trying to make an implementation of the ElGamal encryption for educational purposes. As I understand it, when using the encryption with multiplicative cyclic groups, one generates a cyclic group for a safe private key as follows: 1. Find a safe prime number $p$ (of the form $p = 2*q + 1$ where $q$ is ...
This question is not really well defined. If by "Would this actually work?" you mean "Will this be as good as using a one time pad of length y" then the short answer is **No**. Anything susceptible to a brute force attack is not as secure as a one time pad. What are you trying to achieve? If you already agreed on a ...
I have a question. What contains in a RSA key file like this: -----BEGIN PUBLIC KEY----- MIIBITANBgkqhkiG9w0BAQEFAAOCAQ4AMIIBCQKCAQBUndTbDYZ9HM8WxZRHi6ir Oi1XbiZzRk+ABErWWDxbDc+wo9jM4FSXEPiaZsBtrjgggZu9naCoKTue2BC7FEGh wuRazFP5OnGp9ojq8xoDKtWcREtyfLC2UdYNuA0WrJBr7gUol+Mn5DTKxUFV5KLj 45JDiB2zYPDLzxWWTggjp2pK...
What contains in a rsa key file?
What is contained in a RSA key file?
I am programming an embedded chip that has a hardware 16-bit CRC module. I have to protect some data bytes $d_0,d_1,...,d_{n-1}$ against corruption caused by sudden loss of power; a 32-bit CRC would provide the level of protection that I need, but the chip doesn't have that capability. Unfortunately the CRC module u...
Achieveng 32-bit security with 16-bit CRC?
I am programming an embedded chip that has a hardware 16-bit CRC module. I have to protect some data bytes $d_0,d_1,...,d_{n-1}$ against corruption caused by sudden loss of power; a 32-bit CRC would provide the level of protection that I need, but the chip doesn't have that capability. Unfortunately the CRC module u...
I am programming an embedded chip that has a hardware 16-bit CRC module. I have to protect some data bytes $d_0,d_1,...,d_{n-1}$ against corruption caused by sudden loss of power; a 32-bit CRC would provide the level of protection that I need, but the chip doesn't have that capability. Unfortunately the CRC module u...
Achieving 32-bit security with 16-bit CRC?
Consider a RSA key file like this: -----BEGIN PUBLIC KEY----- MIIBITANBgkqhkiG9w0BAQEFAAOCAQ4AMIIBCQKCAQBUndTbDYZ9HM8WxZRHi6ir Oi1XbiZzRk+ABErWWDxbDc+wo9jM4FSXEPiaZsBtrjgggZu9naCoKTue2BC7FEGh wuRazFP5OnGp9ojq8xoDKtWcREtyfLC2UdYNuA0WrJBr7gUol+Mn5DTKxUFV5KLj 45JDiB2zYPDLzxWWTggjp2pK7u0jHOThMy+A...
I have a MySQL database that I want to encrypt with AES_ENCRYPT() and have to provide access to a variable and possibly changing number of users. Is it possible to derive an encryption key based on a variable number of users such that each user can access the data with their unique private password, but no attacker ...
Is it possible: Derived key based on variable number of private keys?
If part of the password is a whole regular English word, does the entropy of that part depend on the number of English words in existence, the number of English words known by the choosing algorithm, the number of English words assumed by the attacker? Does the language matter, is the average entropy per word in Ger...
Achieving 32-bit verification code with 16-bit CRC?
A paper states: > [...] $(p,g,y)$ is a correct ElGamal public key if $g^x=y\pmod p$. To verify this the order of $g$, and thus the factorization of $p-1$, is needed. This is easy for safe primes (i.e., primes $p$ for which $\frac{p-1}2$ is prime), but may be hard otherwise [...] Why is it easy to factorize a saf...
Informally, the hardness of RSA/Strong RSA assumption lies in the hardness of factoring a large composite number $N$ having two large primes as its factors. If RSA modulus $N$ is a prime number, then the system is trivially breakable. But, what about this variant of the Strong RSA problem presented in [Ben Lynn's Ph...
Is it a variant of Strong RSA assumption?
Current encryption algorithms, such as AES, RSA, elliptic curve, etc. work based on known mathematical problems. I am specifically interested in the RSA. Will such security always remain secure? One way of breaking them would be due to a revolutionary increase computing speeds, making brute-force a viable option....
Will current encryption always remain secure? Is there mathematical proof?
"Will such security always remain secure?" No. $\:$ In particular, quantum computers will break RSA and elliptic curves. <br><br><br> **Has it been mathematically proved that these algorithms can not be cracked, or is it a possibility?** It is a possibility, since [a very-practical algorithm for the Boolean sat...
I have problem called CTB-Locker. It encrypted all of my files on computer and since I have lot of documents that are very important I am in problems! As I read online CTB-Locker uses "elliptical curve cryptography" but I have no idea what that is! But there is 1 bright spot about this! I have 1 original zip fi...
Before starting the question, I know that RSA is naturally a key exchange cryptosystem rather than an antilogarithm fully implemented for encrypting and decrypting data since the length of the secret data relies on the key size of RSA. Now, we know that RSA is asymmetric means it has a public key and a private key.I kn...
Suppose I have two arrays : A = a single byte, being zero. B = two bytes, both being zero. B = A||0 (i.e. B starts with A, and differs only by appending a zero byte) BLAKE2(A) != BLAKE2(B) Yet, according to the scant documentation I can find, BLAKE2 pads with zero bytes. Given that both an array with ju...
How does BLAKE2 ensure that hash(A) != hash(B) when B = A||0 and both A & B have the same number of blocks?
I'm currently trying to prove the following: Where p is a prime number of cryptographic size, prove that: - e(m) = am + b (mod p) where a and b are private is open to a known plaintext attack - e(m) = am + b (mod p) where a, b, and p are private is open to a known plaintext attack - e(m1,m2) = $ \left[ \be...
> how will having a few samples of plaintext-ciphertext pairs help Eve find out p [in the second scheme]? Well, suppose we have four plaintext/ciphertext pairs, and lets look at what is available to the attacker. We make the plaintexts $m_1$, $m_2$, $m_3$, $m_4$, and the corresponding ciphertexts: $$e_1 = a m_1 ...
> how will having a few samples of plaintext-ciphertext pairs help Eve find out p [in the second scheme]? Well, suppose we have four plaintext/ciphertext pairs, and lets look at what is available to the attacker. We make the plaintexts $m_1$, $m_2$, $m_3$, $m_4$, and the corresponding ciphertexts: $$e_1 = a m_1 ...
In ECC how is Point addition commutative?
In ECC how do I prove that Point addition is commutative?
In ECC, how do I prove that point addition is commutative?
Let's take a contactless card for example (one for public transport lets say (i.e. MiCard)), the data is encrypted on the card and encrypted on the reader as far as I know. So how come somebody who could read those cards couldn't just clone the card, copying all the encrypted data onto another card and go around usi...
Why can't you just clone encrypted data and use it?
I have a simple question, if I want to sign a message in it's basic ways, what should I do then? 1) Is signing just encrypting a text with private key? Is 1) right? Or not?
RSA: How to sign a message?
In reading through the original GCM specification (<a href="http://www.mindspring.com/~dmcgrew/gcm-nist-6.pdf">McGrew & Viega '05</a>), the composition of the 128 bit Initialization Vector as a concatenation of a 96b nonce and a 32b unsigned wrapping counter seems arbitrary and forces the scrambling pattern to repeat e...
Is there a strong cryptographic reason for GCM's 2^39 - 256 bit limit?
I have a simple question, When I sign a message does the program encrypt the text with my private key? Because I can decrypt it with my public key. Yes or no. Is signing a message just encrypting with private key?
Is signing a message just encrypting it with private key?
I am not at all knowledgeable in elliptic curve cryptography. So, here lies a couple of questions that I failed to find answers for to my satisfaction. 1. Is there any known Type-III bilinear pairing defined over composite order groups? 2. Do DLIN/SXDH assumptions hold in composite order groups?
> how will having a few samples of plaintext-ciphertext pairs help Eve find out p [in the second scheme]? Well, suppose we have four plaintext/ciphertext pairs, and lets look at what is available to the attacker. We make the plaintexts $m_1$, $m_2$, $m_3$, $m_4$, and the corresponding ciphertexts: $$e_1 = a m_1 ...
I would like to know, how to calculate the inverse S-box. I followed [this][1] link (with affine transformation first, then multiplicative inverse), but the result is wrong. For example, if I use the value <code>0x52</code> (01010010 in binary), reverse of this value would be 01001010. The inverse matrix (for invers...
How are the AES inverse S-Boxes calculated?
For the CTR mode, the design is good for parallelization, yes, it seems the benchmark of the program downloaded from crypto++ proves that on an Intel I7 CPU. My question is that as most of CPU on the computers today are multicore and designed good for multithread calculation, why not all people use the CTR mode as ...
Assume the receiver have a wrong IV (initialization vector), in the CFB mode only the first block of plaintext is wrong but in OFB mode the second and all blocks will be affected. Is that correct? If it is, what is the meaning of the OFB mode compared with CFB mode?
With wrong IV at receiver side, the CFB in better than OFB?
Why isn't CTR mode (counter mode) used more often?
I'm trying to implement threshold RSA operations, starting with decryption based on > Peeters, R., Nikova, S., & Preneel, B. (2008). Practical RSA Threshold Decryption for Things That Think. Retrieved from http://www.cosic.esat.kuleuven.be/publications/article-1178.pdf and running into problems where it seems I wo...
Negative exponents in Shoup's threshold RSA?
It appears (after doing some light research) that for encrypted databases to be practical enough to be usable, deterministic encryption is required. I understand that deterministic encryption allows equal plaintext values to be detected, is possibly vulnerable to frequency analysis and lacks semantic security i.e. is v...
Is this a valid "fix" for deterministic encryption in encrypted databases?
It appears (after doing some light research) that for encrypted databases to be practical enough to be usable, deterministic encryption is required. I understand that deterministic encryption allows equal plaintext values to be detected, is possibly vulnerable to frequency analysis and lacks semantic security i.e. is v...
In reading through the original GCM specification (<a href="http://www.mindspring.com/~dmcgrew/gcm-nist-6.pdf">McGrew & Viega '05</a>), the composition of the 128 bit Initialization Vector as a concatenation of a 96b nonce and a 32b unsigned wrapping counter seems arbitrary and forces the scrambling pattern to repeat e...
Is there a strong cryptographic reason for GCM's 2^39 - 256 bit limit?
It appears (after doing some light research) that for encrypted databases to be practical enough to be usable, deterministic encryption is required, specifically with regard to the type of encryption that always produces the same ciphertext for a given plaintext and key pair. I understand that deterministic encryption ...
I have a simple question, When I sign a message (in RSA) does the program encrypt the text with my private key? Because I can decrypt it with my public key. Yes or no. Is signing a message just encrypting with private key?
I've got a question about the signature of a CA. As I understand, the CA takes the public key of the client and signs it with his own private key by using "md5WithRSAEncryption" (like explained here: http://en.wikipedia.org/wiki/X.509#Sample_X.509_certificates". What does it mean exactly? Can you give me a formal...
A Galois field of the type $GF(p)$, where $p$ is prime, is normally expressed as the ring of integers modulo $p$. If my understanding is correct, it is also possible to represent its elements as a ring $\mathbb Z_2[X]$ of polynomials defined over $GF(p)$, i.e. for $GF(2)$, we'd have polynomials of the form similar t...
A question that could very well be part of xkcd's "what if?": Let's say Monica made a piece of software that sends all RSA keypairs to a central database after they're not used anymore. Something like a keypair-trash. Let's say Monica has convinced everyone in the world to use this piece of software. Monica starts c...
I am taking a cryptography class and our first homework is to implement a 32-bit block cipher. I implemented a simple block-cipher that uses CBC. Currently, my implementation reads both the 32-bit IV and the 32-bit key from a key file. However, I read that the initialization vector is generated randomly, and can be ...
How do I communicate the value of the initialization vector to the end user? Should it be part of the encrypted message?
If a message is encoded with 2048 bit RSA. The ciphertext is $M^e mod N$. In some cases, the message is short, $ M \approx 10^{20} $. With a high probability, $M$ can be written as $M = ab$ with $a, b \leq 4\sqrt{M}$. Can you explain to me how I can find the initial message $M$ given $N, e,$ and the ciphertext usin...
So, browsing through YouTube, I stumbled on [this video][1] interview of John Draper (Captain Crunch), one of the first "hackers". He talks for about 3 minutes (until 27:48) about his home rolled encryption method that will use 1 billion bit keys that randomly change every 5 seconds. My first thought is, is this guy...
1 Billion Bit Encryption?
Examining his claims about "Thundercloud": * You can use it with "any existing software, operating system, or device" (a massive amount of effort---by whom?) * Has its "own cryptographic language that is completely independent of any existing security technology" (this is a **negative** thing: abandoning the entire...
I am curious to know about possibility to login into web application just by identifying the user based on digital signature in usb token. any reference in this direction?
In the context of public-key encryption, what would be a formal definition of the decryption oracle? I know the informal definition (i.e., a function that is available to the adversary and that provides the decryption of any ciphertext of her choice, except for the challenge ciphertext), but I am looking for a *for...
In the context of public-key encryption, what would be a formal definition of the decryption oracle? I know the informal definition (i.e., a function that is available to the adversary and that provides the decryption of any ciphertext of her choice, except for the challenge ciphertext), but I am looking for a *for...
$GF(2^m)$ Galois fields are widely used in different cryptographic algorithms, for example, in Rijndael. However, $GF(p^m)$ fields are possible with any prime $p$, not only 2, but $GF(2^m)$ fields are, as Wikipedia puts it, "especially popular choices for applications", because arithmetic operations in $GF(2^m)$ are...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating them. Some questions about updates to MHT's: 1. Is this because MHT leaves are typically distributed prior to any possible updates, making it hard to recalculate t...
In academic mathematical french, numbers do not have a size. They are values. Only the representation of numbers can have a size (e.g. 357 has a size of 3 digits in base-10 representation). Checking d > N/2 is a check of the value of d. Checking d fills a 256 byte buffer is about size. lcm(p-1, q-1) = ((p-1)\*(q...
Examining his claims about "Thundercloud": * You can use it with "any existing software, operating system, or device" (a massive amount of effort---by whom?) * Has its "own cryptographic language that is completely independent of any existing security technology" (this is a **negative** thing: abandoning the entire...
I'm trying to implement threshold RSA operations, starting with decryption based on > Peeters, R., Nikova, S., & Preneel, B. (2008). Practical RSA Threshold Decryption for Things That Think. Retrieved from http://www.cosic.esat.kuleuven.be/publications/article-1178.pdf and running into problems where it seems I wo...
Does there currently exist a free online service that accepts a file, hashes it, takes an authoritatively chosen timestamp (from one or more time services), signs these and sends this signed message back? E.g. a *digital notary*, but only with regards to the timestamp and not the validity of the content as legal notari...
I am developing a steganography app where user encrypt any file into an audio file. The user can enter a password to protect the hidden data. The same password is converted as a 256 bit key and the hidden data is encrypted using AES. I was wondering, how secure is using password as the AES key?
How secure is it to use password as AES key?
CRCs are based on irreducible polynomials, and the choice of polynomial is driven by the type of error to detect (e.g. CRC 32 for ethernet is "good" for single bits and double bits errors and a few more types of errors typical of noisy transmissions). As a general rules, all CRCs are good to detect single bits up to a ...
CRCs are based on irreducible polynomials, and the choice of polynomial is driven by the type of error to detect (e.g. CRC 32 for ethernet is "good" for single bits and double bits errors and a few more types of errors typical of noisy transmissions). As a general rules, all CRCs are good to detect single bits up to a ...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves). I have some specific questions related to updating MHT's: 1. Is this lack of material regarding updating MHT...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data whilst avoiding unnecessarily increasing the tree height). I have some specific...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data whilst keeping the tree as balanced as possible). I have some specific question...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data whilst keeping the tree as balanced as possible). I have some specific question...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data whilst keeping the tree as balanced as possible). I have some specific question...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data and keeping the tree as balanced as possible). I have some specific questions r...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data and keeping the tree as balanced as possible). I have some specific questions r...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data and keeping the tree as balanced as possible). I have some specific questions r...
It seems that merkle hash tree (MHT) traversals have been discussed somewhat in the literature, but there does not appear to be much written on updating MHT's (i.e. inserting, deleting and updating leaves whilst preserving the order of data and keeping the tree as balanced as possible). I have some specific questions r...
Given a cryptographic hash function $h$, for example SHA256, how hard is it to find plaintexts $a,b,c$ such that $$h(a)\oplus h(b)=h(c) \text?$$
How hard is it to find plaintexts whose hashes satisfy $h(a)\oplus h(b)=h(c)$?