instruction
stringlengths
15
30k
Let (Gen1,H1) and (Gen2,H2) be two hash functions. Define (Gen,H) so that Gen runs Gen1 and Gen2 to obtain keys s1 and s2, respectively. Then define Hs1,s2(x)=Hs1(x)||Hs2(x). a) Prove that if at least one of (Gen1,H1) and (Gen2,H2) aris collision resisistant, then (Gen,H) is collision resistant. b) Determine whe...
We can't implement _"AES 512 key size"_ because AES is [defined][1] for key sizes $k\in\{128,192,256\}$ bits only; much like we can't make a bicycle with 3 wheels. I see no reason why we would _want to_ define an AES _variant_ with 512-bit key size (since AES-128 is safe enough for <strike>anything foreseeable</stri...
Suppose $n$ actors each hold a plaintext $p_i$. We wish to find $\sum p_i$, without leaking any information about individual $p_i$. Any actor (or any link in the network) could be controlled by an active adversary. More precisely, these protocols can be proved secure against a polynomial time bounded adversary who can ...
Suppose $n$ actors each hold a plaintext $p_i$. We wish to find $\sum p_i$, without leaking any information about individual $p_i$. Any actor (or any link in the network) could be controlled by an active adversary. More precisely, these protocols can be proved secure against a polynomial time bounded adversary who can ...
We can't implement _"AES 512 key size"_ because AES is [defined][1] for key sizes $k\in\{128,192,256\}$ bits only; much like we can't make a bicycle with 3 wheels. I see no reason why we would _want to_ define an AES _variant_ with 512-bit key size (since AES-128 is safe enough for <strike>anything foreseeable</stri...
Suppose $n$ actors each hold a plaintext $p_i$. We wish to find $\sum p_i$, without leaking any information about individual $p_i$. Any actor (or any link in the network) could be controlled by an active adversary. More precisely, these protocols can be proved secure against a polynomial time bounded adversary who can ...
In DSA, one needs to generate two primes $p$ and $q$ such that $q$ is $256$-bit and $p$ is $3072$-bit and $p-1$ is a multiple of $q$. Question: How to generate such $p$ and $q$. Attempt: First, use a random number generator to generate $256$-bit number, say $q$. Then test whether it is a prime. If it is not, gen...
**My understanding of Rabin** We have `p` and `q` which are distinct primes congruent to `3 mod 4`. Then we have `n = p*q`. Encryption is done as `e(m) = m^2 mod n`, where `m` is our message. Decryption is done by evaluating `d(c) = sqrt(m) mod n`, where `c` is our ciphertext. This can be accomplished by det...
what does rsaSha512Sign do?
This question as stated actually has a fairly interesting and unintuitive answer. Assuming an 8 byte 64 bit xor key and your test for printable ascii characters then after a megabyte of correct data your chances of having the right key are... about one in four billion. This is completely independent of how much data...
What does $\Pi$ represent in cryptography?
Having a little trouble getting Nessie vectors working with the Bouncy Castle SerpentEngine. Do the Nessie vectors require a mode or some pre-processing? Nessie Serpent 128, set 1, vector 0 reads: key=80000000000000000000000000000000 plain=00000000000000000000000000000000 cipher=264E5481EFF42A4606ABDA06C0BFD...
I just picked up cryptography and have some questions on RSA: 1. Say there are two public keys (n, e1), (n, e2), e1 is coprime to e2. They share the same n. Is it possible to find the plaintext if both of them encrypt the same message if I have both 2 public keys and 2 ciphertexts? 2. Usually, we use two primes p...
How can I start the following crypto project?
I just picked up cryptography and have some questions on RSA cryptosystem: 1. Say there are two public keys (n, e1), (n, e2), e1 is coprime to e2. They share the same n. Is it possible to find the plaintext if both of them encrypt the same message if I have both 2 public keys and 2 ciphertexts? 2. Usually, we use...
Can an attacker construct a DH group of a certain size (say, 2048 bits), such that the group appears safe, but the attacker is able to solve the DLP in the group easily? With "appears safe", I mean that the users check the modulus to make sure it's a safe prime. A lot of applications of DH either use a [well known m...
Can someone explain why an interactive assumption is not falsifiable? Maybe I'm misunderstanding what the statement means, but isn't even a non-interactive assumption interactive, but just with a zero amount of interaction? ps. There doesn't seem to exist a tag that matches this question, so please suggest one that ...
Interactive assumptions not falsifiable?
Can an attacker construct a DH group, large enough to be considered secure (say, a modulus of 2048-bits), such that the group appears safe, but the attacker is able to solve the DLP in the group easily? A lot of applications of DH either use a [well known modulus, such as from RFC 3526][1], or generate it themselves...
I am working on Ciphertext-Policy Attribute based Encryption (CP-ABE) and I need to understand how a secret key looks like. For example, assume that the universe of attributes is defined to be {A,B,C,D} and user 1 receives a secret key (SK) to attributes {A,B} such that: A="NY" and B="Computer". My question is: Does...
Can an attacker construct a DH group, large enough to be considered secure (say, a modulus of 2048-bits), such that the group appears safe, but the attacker is able to solve the DLP in the group easily? A lot of applications of DH either use a [well known modulus, such as from RFC 3526][1], or generate it themselves...
While I look for how many characters that can be encrypted using the The elliptic curve ElGamal cryptosystem. of each block found for these lines. But I can not understand **Actually in our case we need to divide into an even number of blocks. If we think in a character as a number < 256 (its ASCII code) and we emp...
How many characters per block in an El Gamal ECC cryptosystem?
Can someone explain why an interactive assumption is not falsifiable? Maybe I'm misunderstanding what the statement means, but isn't even a non-interactive assumption interactive, but just with a zero amount of interaction? There is no context here, just this isolated paragraph in the intro of a paper: > Due to a...
Can someone explain why an interactive assumption is not falsifiable? Maybe I'm misunderstanding what the statement means, but isn't even a non-interactive assumption interactive, but just with a zero amount of interaction? There is no context here, just this isolated paragraph in the intro of a paper: > Due to a...
From what I understand, an elliptic contains a set points satisfying the equation $y^2=x^3 + ax + b$ together with the point at infity. It seems clear how multiplication with a scalar and a point works, and how point addition works. Discussions about cryptographic applications usually jump right to curves defi...
Elliptic curve trapdoor function without modular arithmetic?
I'm learning RSA in one of my classes and we were given a problem: p = 5, q = 11 I have done the following steps: n = 5 * 11 = 55 s = (5-1)*(11-1) = 40 I know to find e we have to find co-prime of s where s is 40 and gcd(e,40) = 1. Is there a algorithm I can use by hand that can give ...
Is there a way to systematically calculate co-prime in RSA given n?
There are many ARX ciphers, however most use fixed rotations. I know data-dependent compared to fixed rotations are: - patented - harder to implement constant time - more expensive in hardware - harder to analyse - attacker can control rotation to some degree Do data-dependent rotations have any advan...
Do data-dependent rotations have any advantage over fixed rotations?
if I use AES-CBC and HMAC-SHA256 to enc a txt file. Will the output be larger size than input or same size? which one can be more secure? change sieze or not change size?
is the output of AES-CBC has the same size as input?
I use AES-CBC and HMAC-SHA256 to encrypt a text file. Will the output be larger in size than the input or will it be the same size? Is it more secure secure if the size of the output is larger?
Is the output of AES-CBC + MAC the same size as the input?
If it use AES-CBC and HMAC-SHA256 for message send online, and someone try to reply attack on this message. Can the attack be successful? what will be happen when attacking?
What happens when cbc+hmac get a reply attack?
if use AES-cbc,HMAC-SHA256, and there is some txt needed to be enc, and I divide this txt into small packages with variable length, then enc them. some of these package can be less than 128bit. Is this still secure? will it cause any problem?
if using cbc+hmac dealing with small size of data(less than 128bit) , will it cause any problem?
I have to encrypt big files. Say their size ranges from 500mb to several of gigabytes. I would like to use AES/GCM/NoPadding as provided by Java 1.8 since that gives me automatic authentication and encryption. I would like to use the handy Cipher Input/Output Stream cause I can chain it with GZip I/O Streams to c...
First I need to mention that I can't use BouncyCastle to implement this solution. I have to encrypt files into the file system. Those files are not going to be tranfered over the wire to any other location. They are only going to be stored in the server for later use by an application installed there. The file syste...
##Context I recently came across a video on the net showing the process of key exchange in Diffie Hellmann. Alice and Bob want to communicate. Eve is the (wo)man in the middle. This video is the basis of my question http://youtu.be/YEBfamv-_do?t=6m22s ##Question Alice sends the modulo and the prefix to b...
DHE key exchange. Is it really secure?
A lot of modern cryptography is based on some mathematical assumptions and aims to achieve what is called Computational Security. That means that the adversary (Eve) could get some information about the plaintext with a negligible probability and the adversary is modeled as someone with bounded computational power, sto...
A lot of modern cryptography is based on some mathematical assumptions and aims to achieve what is called Computational Security. That means that the adversary (Eve) could get some information about the plaintext with a negligible probability and the adversary is modeled as someone with bounded computational power, sto...
In 1992, cypherpunks was created as a mailing list for activists advocating for cryptography. Arguably, the cypherpunks mailing list was the foundation for the movement and the centre of it all. However, the original list is dead and the cryptography mailing list also seems to have been inactive since late 2013. W...
Where have all the cypherpunks gone?
In 1992, cypherpunks was created as a mailing list for activists advocating for cryptography. Arguably, the cypherpunks mailing list was the foundation for the movement and the centre of it all. However, the original list is dead. All I really know of is the moderated cryptography list. Where have all the modern cy...
The question asks how to pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RSA should be an in...
The question asks how to pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RSA should be an in...
What are the currently recommended modes of encryption for large disks? Basic requirements would seem to be that you can update an encrypted sector independently of others, which rules out most standard modes of operation except CTR. For example are there any problems with taking the counter to be the current block num...
Modes of encryption for hard drives?
The question asks how to pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RSA should be an in...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
I'm learning RSA in one of my classes and we were given a problem: > $p = 5, q = 11$ I have done the following steps: > $n = 5 \cdot 11 = 55$<br> > $\phi = (5-1)\cdot(11-1) = 40$ I know that to find $e$ we have to find an integer co-prime with $\phi$, where $\phi$ is $40$ and $\gcd(e,40) = 1$. I...
Is there a way to systematically calculate the public exponent $e$ in RSA?
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
Firstly I want apologize for my English. If something will be unclear I will explain it. On my site, users can download files which are stored on public hosting, so I need encrypt them. Downloading file is divided by blocks of 1 kB and I want crypt them with same key. I read the best option is AES cipher, but I don't ...
On my site, users can download files which are stored on public hosting, so I need to encrypt them. A downloaded file is divided into blocks of 1 kB and I want encrypt them individually, using the same key. I have read that the best option for performing the encryption is AES, but I don't know which mode should I use. ...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
@CodesInChaos is right, here is an example of his method on your data : $40 = 2^2 5$ so I pick, say $e=3$, which is for sure coprime with $40$. Actually $e=3$ is a common value in some implementations of RSA (see @fgrieu giant response about that) By chance (or did you teacher foresaw it ?) Extended Euclidian...
I found this question from a textbook but I don't really understand what it is asking: Suppose $c$ is $1$ block long, $a$ and $b$ are strings that are a multiple of the block length, and $\text{CBC-MAC}(a||c) = \text{CBC-MAC}(b||c)$. An ideal block cipher is used in $\text{CBC-MAC}$. Explain for which most genera...
I found this question about CBC-MAC forging and want to make sure I understand it: > Let a and be be two strings of block length one. Suppose the sender sends $(a, \text{CBC-MAC}(a)), (b, \text{CBC-MAC}(b)), (a||b, \text{CBC-MAC}(a||b))$. Find new messages / MAC pair which the attack can now forge from the messages ...
Is there an "additive" proof-of-work?
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
I'm learning RSA in one of my classes and we were given a problem: > $p = 5$, $q = 11$ I have done the following steps: > $n = 5 \cdot 11 = 55$<br> > $\phi = (5-1)\cdot(11-1) = 40$ I know that to find $e$ we have to find an integer co-prime with $\phi$, where $\phi$ is $40$ and $\gcd(e,40) = 1$. ...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
I am in need of a really simple limited PRNG, that either exists or can easily be created in virtually any language on any platform. It takes only the initial seed, and is only expected to generate a small amount of output in its lifetime, normally 32-64 bytes but potentially more with very low probability. It will n...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public exponent in RS...
I am in need of a really simple limited PRNG, that either exists or can easily be created in virtually any language on any platform. It takes only the initial seed, and is only expected to generate a small amount of output in its lifetime, normally 32-64 bytes but potentially more with very low probability. It will n...
I am in need of a really simple limited PRNG, that either exists or can easily be created in virtually any language on any platform. It takes only the initial seed, and is only expected to generate a small amount of output in its lifetime, normally 32-64 bytes but potentially more with very low probability. It will n...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
I'm trying to implement parameters generation for ECDSA according to SEC1 v2.0: Input: The approximate security level in bits = t is {80, 112, 128, 192, 256} Output: Elliptic curve domain parameters over Fp: T = (p, a, b, G, n, h) Here's the 2nd step of the algorithm: 2. Select elements (a, b) is ...
@CodesInChaos is right, here is an example of his method on your data : $40 = 2^3 5$ so I pick, say $e=3$, which is for sure coprime with $40$. Actually $e=3$ is a common value in some implementations of RSA (see @fgrieu giant response about that) By chance (or did you teacher foresaw it ?) Extended Euclidian...
If it use AES-CBC and HMAC-SHA256 for message send online, and someone try to replay attack on this message. Can the attack be successful? what will be happen when attacking?
What happens when cbc+hmac get a replay attack?
We define the polynomials $r, f_1,f_2,s \in R[x]$. Where $r$ is a random degree 1 polynomial and $s$ is a random polynomial such that: $degree(s)=degree(f_1)=degree(f_2)$ My question: " How to To prove: Given $\ r\cdot f_1 +f_2 \cdot (s+1)$ one who knows only $f_2$ cannot learn anything about $f_1$." *** Or even...
We define the polynomials $r, f_1,f_2,s \in R[x]$. Where $r$ is a random degree 1 polynomial and $s$ is a random polynomial such that: $degree(s)=degree(f_1)=degree(f_2)$, let $R$ be $\mathbb{Z}_p$ where $p$ is a large prime number. My question: " How to To prove: Given $\ r\cdot f_1 +f_2 \cdot (s+1)$ one who knows...
Proving correctness of a decryption of a homomorphically summed ciphertext?
I need to use a cryptographically secure pseudo random number generator in my client running Javascript and in my server running Java. Is there a well-known implementation of a good CSPRNG in both Java and Javascript? If not, is there a pseudo-code description of a good CSPRNG I can implement myself in Java and ...
In late 1997, the history of public-key cryptography was turned around with the [announcement by the CESG (April 2000 archive)][1] that - public-key cryptography was theorized in a 1970 note \[1\] by [James Henry Ellis][2]: [_The Possibility of Secure Non-Secret Digital Encryption_][3]; - a feasible realization of ...
Verbatim of early work on public-key cryptography?
The question asks how to _systematically_ pick the public exponent $e$ in RSA. I'll stick to public modulus $N$ that is the product of exactly two distinct odd primes $p$ and $q$, but the choice of $e$ is not fundamentally different in multiprime RSA. What's an acceptable public exponent $e$? -- The public expon...
When I was read about the elliptic curve cryptography I found some definition about domain parameter of elliptic curve like the follow. But I did not understand something $p$: prime number. $a, b$: field elements, they specify the equation of the elliptic curve $ E$ over $F_P$, $y^2 ≡ x^3+a • x+b $ $G$: A...
What is the difference between order of base point and curve order in EC?