instruction stringlengths 15 30k |
|---|
I am implementing a key distribution protocol described by Torben Pedersen in *A Threshold Cryptosystem without a Trusted Party* (EUROCRYPT'91). In the protocol, the $n$ parties distribute a public key for the ElGamal cryptosystem, where each party ends up with "part of" the private key and can work together to decrypt... |
> Does re-encrypting the same value with multiple keys reduce security?
The answer is "it depends"; there are some attack models and encryption methods where the security is reduced, there are other cases where there appears to be no security reduction.
Let us go through some models where we actually see a securi... |
> Suppose there is a secure PRF s.t. F: K X X $\rightarrow$ Y. Then Is F': X X K $\rightarrow$ Y is secure PRF?
In my opinion it should be because changing keyspace with message space won't effect on security. As we were choosing random key from key space similarly we can choose a key from msg space randomly and can... |
When I use the same 128-bit key for AES-128 and AES-256 with a known/public padding for the latter,
<br>
is there some weakness in AES-256 that is not present in AES-128 with essentially the same key?
This might be the case when I'm receiving the key from an
<br>
algorithm which just doesn't produce enough bits ... |
Does AES-128 have the same strength as AES-256 with a padded key? |
> Suppose there is a secure PRF $F: K \times X \to Y$. Then is $F': X \times K \to Y$, defined by $F'(x,k):=F(k,x)$, a secure PRF?
In my opinion it should be because exchanging the keyspace with the message space shouldn't effect the security. As we were choosing a random key from the key space, similarly we can cho... |
Assume it is made a hash based on AES-256 encryption (perhaps because this is hardware-accelerated, but no standard hash is); and it is used the [Merkle–Damgård][1] structure, that is padding of the message into $n$ padded message blocks $M_i$ (appending to the message a 1, a minimal number of 0, and the 64-bit message... |
If you have the setting of $G$ being a prime order $p$ group (written multiplicatively) generated by $g$ and your public-secret key pair is $(pk,sk)=(y=g^x,x)$, then encrypting a single message $m\in Z_p$ amounts to choosing $k\in_R Z_p$ and computing $(c_1,c_2)=(g^k,my^k)$.
If you have a message $m=(m_1,\ldots,m_l... |
RSA offers the functionality of encrypting (short messages, or symmetric keys) with a public key, and decrypting with a private key. However, RSA key generation is extremely expensive, especially for 2048-bit+ keys. Is there a scheme which employs elliptic curve cryptography, fast asymmetric encryption, fast key gene... |
Are there any elliptic curve asymmetric encryption schemes? |
Are there any elliptic curve asymmetric encryption algorithms? |
RSA offers the functionality of encrypting (short messages, or symmetric keys) with a public key, and decrypting with a private key. However, RSA key generation is extremely expensive, especially for 2048-bit+ keys. Is there an algorithm which employs elliptic curve cryptography, fast asymmetric encryption, fast key ... |
[_RSA for Paranoids_ (RSAP)][1] (in cryptobytes v3n1), also known as unbalanced RSA, is a variant of RSA proposed in 1995 by Adi Shamir, as a mean to increase the RSA public modulus size while keeping computation cost moderate. It is getting renewed interest, as part of a lightweight authentication and key agreement pr... |
Security of RSA for paranoids with padding? |
[_RSA for Paranoids_ (RSAP)][1] (in cryptobytes v3n1), also known as unbalanced RSA, is a variant of RSA proposed in 1995 by Adi Shamir, as a mean to increase the RSA public modulus size while keeping computation cost moderate. It is getting renewed interest, as part of a lightweight authentication and key agreement pr... |
[_RSA for Paranoids_ (RSAP)][1] (in cryptobytes v3n1), also known as unbalanced RSA, is a variant of RSA proposed in 1995 by Adi Shamir, as a mean to increase the RSA public modulus size while keeping computation cost moderate. It is getting renewed interest, as part of a lightweight authentication and key agreement pr... |
My best interpretation of [this question][1] is that Java's crypto API has been subverted to perform RSA signature using PKCS#1 v1.5 **encryption** padding.
Assume the signature $S$ of a message $M$ is obtained by:
- hashing $M$ using SHA-1, yielding the 20-byte $H$;
- generating a 105-byte uniformly (true) rand... |
[_RSA for Paranoids_ (RSAP)][1] (in cryptobytes v3n1), also known as Unbalanced RSA, is a variant of RSA proposed in 1995 by Adi Shamir, as a mean to increase the RSA public modulus size while keeping computation cost moderate. It is getting renewed interest, as part of a lightweight authentication and key agreement pr... |
What is a 'secret key factory'? What precisely is it doing? |
I don't know if it has a name, but I can tell you that it is a bad idea. A very bad one. The only thing I have to do to break the encryption is to try all the possible combinations of 4 bytes in the total 24 byte string. Intuition may tell some people that there are many combinations, but really? How many combinations ... |
I don't know if it has a name, but I can tell you that it is a bad idea. A very bad one. The only thing I have to do to break the encryption is to try all the possible combinations of 4 bytes in the total 24 byte string. Intuition may tell some people that there are many combinations, but really? How many combinations ... |
The original question was:
> Alice knows: $a,b$ and $x$ such that $a^{(x\cdot x)} = b$
> Bob knows: $a,b$
and DrLecter referenced [this paper](http://www.di.ens.fr/~bresson/papers/BreSte02.pdf) (fixed the link), which covers the question.
Now, the question was changed to
> Alice knows: $b$ and $x$ such ... |
Can anyone explain the following text passage to me?
> Most real-world block ciphers build **even** permutations,
> because it's hard to build odd ones using small operations (32 bit)
> on larger (128 bit) block size.
I don't understand the connection between parity of a permutation and small operations. |
First of all, we need to review what they mean by "parity of a permutation"; they don't mean whether the input block had a even number of 1's.
Instead, they view the $n$ bit cipher (with a specific key) as a permutation on $2^n$ objects; that is, it can be review as a way of rearranging that set of $2^n$ objects ont... |
First of all, we need to review what they mean by "parity of a permutation"; they don't mean whether the input block had a even number of 1's.
Instead, they view the $n$ bit cipher (with a specific key) as a permutation on $2^n$ objects; that is, it can be review as a way of rearranging that set of $2^n$ objects ont... |
Is it possible to design a protocol that by itself guarantees that a malicious implementation cannot leak secret data without breaking the protocol?
**Setting:**
* Alice and Bob have a pre-shared secret key K. Using this key, Alice encrypts a bunch of plaintexts and sends them to Bob as a collection of files. The... |
In other words, has there ever been a point in time in which having the content of a message has actually helped break a hash function? |
Has there ever been more then a theortetical difference between preimage resistance and second preimage resistance? |
I'd be a noob in cryptography but reading up a little on RSA, I do get some understanding and I want to specifically resolve this issue.
**UPDATED**
Lets say we have the following values in place:
KEYSIZE = 512
HASHSIZE = sha.digestsize*8
digest = some SHA 512 function
We calculate the pub... |
I'm working with one-way accumulators, but I'm not knowledgable in cryptography. Is there an easy peasy way to hash numbers (or whatever) into prime numbers?
Obviously I'd like it to be collision resistant and all that, but this project is huge, I'm alone and I'm confident someone else in the field will pick up from t... |
How to convert numbers into prime numbers? |
Imagine a SSL-like protocol that instead of using certificates signed by a trusted CA, it has the server's public key hard-coded in the client.
My question is: what happens if the server's private key is compromised?
Without certificates, the system doesn't have the CRL (Certificate Revocation List) and until the use... |
Imagine a SSL-like protocol that instead of using certificates signed by a trusted CA, has the server's public key hard-coded in the client.
My question is: what happens if the server's private key is compromised?
Without certificates, the system doesn't have a CRL (Certificate Revocation List) and until the users up... |
How can I convert numbers into prime numbers? |
Is there a map between the group of $\mathbb{Z}_{N^2}^*$ where $N$ is a composite number , a product of two equal size secure prime numbers $p$ and $q$ and a finite field $\mathbb{F}$, such that for all $x \in \mathbb{Z}_{N^2}^*$ there is a polynomial representation of $x \in \mathbb{F}$ ? |
Is anyone aware of Du atallah multiplicative secret sharing scheme for dot products for > 2 party scenario? |
Suppose I have n hash/MAC functions, of which n-1 are extremely insecure, leaving only one that is in fact cryptographically secure. If I use all of them on a message and the XOR them together the result will be cryptographically secure or not?
I believe it would, because if 1 is secure than it's output is undistingui... |
**Yes, we can build a hash function from a block cipher**, and that's common, although with block ciphers designed for that purpose, when in the following I focus on AES, mentioned in the (different) question that motivated the present answer <sub><sup>[which got moved here because said question was found to be a dupli... |
**Yes, we can build a hash function from a block cipher**, and that's common, although with block ciphers designed for that purpose, when in the following I focus on AES, mentioned in the (different) question that motivated the present answer <sub><sup>[which got moved here because said question was found to be a dupli... |
referring to both
- [Wikipedia page] (http://en.wikipedia.org/wiki/Elliptic_Curve_DSA) and
- [ECDSA-cert](http://cs.ucsb.edu/~koc/ccs130h/notes/ecdsa-cert.pdf) paper
I can understand that, given $\mathcal{E} = \mathcal{E}(a,\,b,\,\mathbb{F}_{2^m})$ as our elliptic curve on $\mathbb{F}_{2^m}$ group
- $G \in... |
If we assume the strength of RSA is based on the difficulty of factoring (which I know we can't guarantee) and we compose the modulus of some other quadratic ring that is a unique factorization domain like the Gaussian integers, what is the resistance to attacks based on factoring with classical computing techniques?
... |
Is the strength of RSA over quadratic or other cyclotomic fields as strong as over the integers? |
I would like to understand how secure the permutation cipher is.
I would specifically like to understand the following concrete setup: If the alphabet is $L = \{0,1,\dots , 255\}$ and $\sigma_1, \sigma_2, \dots, \sigma_n $ are permutations on $L$, then we can create a cipher by encrypting the first character in the ... |
Referring to both
- [Wikipedia page](http://en.wikipedia.org/wiki/Elliptic_Curve_DSA) and
- [ECDSA-cert](http://cs.ucsb.edu/~koc/ccs130h/notes/ecdsa-cert.pdf) paper
I can understand that, given $\mathcal{E} = \mathcal{E}(a,\,b,\,\mathbb{F}_{2^m})$ as our elliptic curve on $\mathbb{F}_{2^m}$ group
- $G \in ... |
I did work on the encryption algorithm and the decryption using the XOR method noticed that when more the key length, the less time spent on encryption and decryption.
I have two questions in particular
1 - Why the greater the key length less time?
2 - in encryption algorithms using the XOR. Is the key should b... |
The relationship between the key length and encrypt time in Xor algorithm? |
> How secure is this cipher?
At first glance, not very. It would appear to be vulnerable to a ciphertext-only attack, for example, the attacker can recover the plaintext given a ciphertext of about 10k (actually, he probably can deal with less), even assuming that all the attacker initially knows is that the plaint... |
I did work on the encryption algorithm and the decryption using the XOR method noticed that when more the key length, the less time spent on encryption and decryption.
I have two questions in particular:
1. Why the greater the key length less time?
2. in encryption algorithms using the XOR. Is the key should ... |
Is ElGamal still unforgable if the adversary knows the value of r that was calculated by g^k? |
Is ElGamal still unforgable if the adversary knows the value of r that was calculated by g^k?
when we do sign the message r = g^k.
As we know the regular ElGamal existentially forgeable:
e is picked randomly from Z_p-1
r = g^e * y (mod p) and s is -r (mod p)
When we check if it was forged we check for y^r * r^s =... |
Is the CCA-1/2(chosen-ciphertext attack ) attack only for Public-key Cryptosystem? |
Do [Chosen-Chiphertext attacks](http://en.wikipedia.org/wiki/Chosen-ciphertext_attack) (CCA-1/2) only apply to public-key Cryptosystem? |
Do Chosen-Chiphertext attacks only apply to public-key cryptosystems? |
Is ElGamal still unforgable if the adversary knows the value of $r$ that was calculated by $g^k$?
When we do sign the message $msg$, we calculate $r = g^k$.
As we know the regular ElGamal existentially forgeable:
- $e$ is picked randomly from $\mathbb{Z}_{p-1}$
- $r = g^e \cdot y$ mod $p$ and $s$ is $-r$ mod... |
Are there any guidelines or justification for converting a stream cipher algorithm for use as a CSPRNG?
For instance, lets say I wanted to convert one of the eStream portfolio Profile 1 (software) selections for use as a CSPRNG. What I could do is generate a really unique hash from some other algorithm and use it a... |
The symmetric cryptosystem One time pad seems to be very beautiful since it is perfectly secret according to Shannon. Many books, however, points out that the main drawback is that one must create a secret key of length as the plaintext. For this reason the concept of perfect secrecy is nowadays abandoned, and we prefe... |
One time pad: why it is useseless in practice? |
The symmetric cryptosystem One time pad seems to be very beautiful since it is perfectly secret according to Shannon. Many books, however, points out that the main drawback is that one must create a secret key of length as the plaintext. For this reason the concept of perfect secrecy is nowadays abandoned, and we prefe... |
One time pad: why does it is useless in practice? |
The symmetric cryptosystem One time pad seems to be very beautiful since it is perfectly secret according to Shannon. Many books, however, point out that the main drawback is that one must create a secret key of length as the plaintext. For this reason the concept of perfect secrecy is nowadays abandoned, and we prefer... |
The symmetric cryptosystem One time pad (OTP) seems to be very beautiful since it is perfectly secret according to Shannon. Many books, however, point out that the main drawback is that one must create a secret key of length as the plaintext. For this reason the concept of perfect secrecy is nowadays abandoned, and we... |
One time pad: why is it useless in practice? |
[1] https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/sha1.js
this._hash = new WordArray.init([
0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476,
0xc3d2e1f0
]);
[2] https://code.google.com/p/google-authenticator/source/browse/libpam/totp.html
V = 0x67452301,... |
I just learned about the basics of public cryptography a few weeks ago and I am curious as to why the C rand() function should not be used for crypto schemes. For example, say I want to generate a private key using the C rand() function, along with srand(). Lets say srand() generates a seed based on system time (as in ... |
How vulnerable is the C rand() in public cryptography protocols? |
In the example you linked, the current time (specifically, a value representing the number of seconds elapsed since Jan 1, 1970 UTC) is used as the seed. If an attacker knows which year you generated your key, then that leaves only about 2^25 possible values for the seed --- and therefore only about 2^25 possible value... |
Let's say I have fileA and fileB, both encrypted somehow, but in the same method with different keys.
If I xor them together, they will make a repeating pattern of 32 bytes length.
What does that say about the repeating pattern, the encryption pattern, and the likelihood of the unencrypted files to be identical?
... |
What does it mean when two encrypted files, encrypted with the same method but with different keys, when xor'd together, produce a repeating pattern? |
1. https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/sha1.js
this._hash = new WordArray.init([
0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476,
0xc3d2e1f0
]);
2. https://code.google.com/p/google-authenticator/source/browse/libpam/totp.html
... |
Let's say I have fileA and fileB, both encrypted somehow, but in the same method with different keys.
If I xor them together, they will make a repeating pattern of 32 bytes length.
What does that say about the repeating pattern, the encryption pattern, and the likelihood of the unencrypted files to be identical?
... |
The two plaintexts are almost certainly identical. At the very least, any difference between them must be representable in 32 bytes, since that's as much information as the XOR of the encrypted files contains.
Assuming that the plaintexts are indeed identical, we can also see that changing the encryption key has a ... |
Hi everyone i wrote a simple python script to preform one time pad encryption
I would like to be able to decrypt the ciphertext by hand , In my script i use mod 26
this is how i was shown to calculate a mod using a calculator.
467%26 = 25
467/26 = 17.9615...
17*26=442
467-442=25
I used this code to pr... |
I've been working on a project that will require secure communication over the internet, so I've been thinking of TLS 1.2. After looking around I chose [Botan][1] but then I thought about using a more common one, OpenSSL. But since Heartbleed I've been reading quite a bit about problems with OpenSSL, and it seems to be... |
I wrote a simple python script to preform one time pad encryption
I would like to be able to decrypt the ciphertext by hand. In my script I use mod 26.
This is how I was shown to calculate a mod using a calculator:
- 467%26 = 25
- 467/26 = 17.9615...
- 17*26=442
- 467-442=25
I used this code to preform th... |
It's still common to come across implementations of KDF0 and KDF1. Basically these are KDF's that simply derive multiple keys from the key seed and a counter:
$K_i = KDF(K_{master}, i) = H(K_{master} | c)$
In this function $|$ means concatenation and $c$ is the encoded value of $i$ in 4 bytes using an unsigned bi... |
I have been looking at the scrypt hashing algorithm and am confused as to why the `N` value, which determines the overall cost, is limited to powers of two. There are only 3 things that the N value actually affects
1. The amount of times to mix with salsa (via two loops with N being the count)
2. The amount of memo... |
Is there a reason that the N value in scrypt is limited to powers of two? |
The usual definition of MAC security is (roughly) that there is no "efficient" adversary that has non-negligible advantage in the "MAC game" where the MAC game is as follows: the challenger chooses a random key, the adversary sends some messages to the challenger, the challenger sends the MACs of those messages with th... |
XORing a header with SHA512-hash - secure? |
It's still common to come across implementations of KDF1 and KDF2. Basically these are KDF's that simply derive multiple keys from the key seed and a counter:
$K_i = KDF(K_{master}, i) = H(K_{master} | c)$
In this function $|$ means concatenation and $c$ is the encoded value of $i$ in 4 bytes using an unsigned bi... |
The popular command line utility [ssss](http://point-at-infinity.org/ssss) implements the classic Shamir's secret sharing scheme over the generic $GF(2^p)$ field.
When $p>=64$, the constant coefficient ($c_0$) is not the secret but a transformed version of it, obtained by means of a ligtweight block encryption.
W... |
The popular command line utility [ssss](http://point-at-infinity.org/ssss) implements the classic Shamir's secret sharing scheme over the generic $GF(2^q)$ field, with $8 \le q \le 1024$.
When $q>=64$, the constant coefficient ($c_0$) is not the secret but a transformed version of it, obtained by means of 40 rounds ... |
The popular command line utility [ssss](http://point-at-infinity.org/ssss) implements the classic Shamir's secret sharing scheme over the generic field $GF(2^q)$ with $8 \le q \le 1024$.
When $q>=64$, the constant coefficient ($c_0$) is not the secret but a transformed version of it, obtained by means of 40 rounds o... |
Note that, despite your notation, the exponent does not need to be prime.
<br><br><br>
"Why is that?"
<br>
They probably do that to reduce the impact of malleability on the reconstruction process.
"Which attack does it prevent?"
<br>
It might prevent simple malleation when the secret is not easily guessable.
... |
"a [block cipher][1] is a deterministic algorithm operating on fixed-length groups of bits, called blocks, with an unvarying transformation that is specified by a symmetric key. - Wikipedia "
But with a native tweak support inside a block cipher, one can achieve "varying" transformation with same symmetric key bu... |
Is a tweakable block cipher still considered deterministic in nature? |
I am trying to implement a password manager in C and I had a question about the proper steps in implementing the crypto. I looked at some implementations, google talks on crypto and what the standards are.
so I just wanted to list out the steps in the program and I wanted to make sure I was doing it right.
1. I... |
I want to encrypt user's files on our server. For this purpose I decided to use php Mcrypt library. I choose Rijandel-128 algorithm and CBC mode for encryption. Since files are quite large I decided to encrypt/decrypt files by chunks.
Everything works well when I use one chunk size for encryption and decryption pro... |
Lets say that we use init vector IV, key K and HMAC key H. Message is M.
Mode of operation is CBC !!!
We usually encrypt this way:
C = crypt(M,K,IV) #encrypted data
R = C + MAC(C) # final result and + is for con cat
But we could just use:
R = len + crypt(M + H,K, IV) # notice M... |
Lets say that I am using 128 bit HMAC. How many operations are needed to find a *"non secure"* message. Is a birthday attack possible? |
I want to encrypt user's files on our server. For this purpose I decided to use the PHP Mcrypt library. I chose to use the Rijandel-128 algorithm and CBC mode for encryption. Since files are quite large, I decided to encrypt/decrypt files by chunks.
Everything works well when I use one chunk size for encryption and... |
I've got an academic curiosity regarding some of the old Japanese naval codes used during World War II specifically, but I was just wondering if any of the codebooks from this era had been made available, or if they are still protected materials? |
Is it possible to track down copies of WW2-era codebooks? |
Merkle-Winternitz signatures based on fractal hash trees are an attractive alternative to other post-quantum cryptographic schemes, in particular since they are conceptually simple, the security properties are easily understood and they are easy to implement correctly.
However, all schemes based on Merkle trees appe... |
Stateless hash based public key cryptography? |
The AES GCM example for Ruby / OpenSSL shown at: http://ruby-doc.org/stdlib-2.0/libdoc/openssl/rdoc/OpenSSL/Cipher.html has a GCM example of the following:
cipher = OpenSSL::Cipher::AES.new(128, :GCM)
cipher.encrypt
key = cipher.random_key
iv = cipher.random_iv
cipher.auth_data = ""
... |
Leaving authentication data blank less secure for AES GCM? |
[AEAD](http://en.wikipedia.org/wiki/AEAD_block_cipher_modes_of_operation) modes like GCM are authenticated encryption with *associated data*; this setting only affects the associated data half of that. The ciphertext itself is still authenticated. The associated data portion is there to provide contextual information f... |
**Notation:** $\Sigma^k$ is the set of $k$-strings on the alphabet $\Sigma$; $\Sigma^\ast$ is the set of all finite dimensional strings on the alphabet $\Sigma$.
----------
In the context of computer-science a strong one-way function is generally defined as follows:
A function $f:\Sigma^{\ast}\longrightarr... |
[AEAD](http://en.wikipedia.org/wiki/AEAD_block_cipher_modes_of_operation) modes like GCM are authenticated encryption with *associated data*; this setting only affects the associated data half of that. The ciphertext itself is still authenticated. The associated data portion is there to provide contextual information f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.