instruction stringlengths 15 30k |
|---|
Consider the following modification of RC4 to give some "ciphertext feedback"
i ← 0
j ← 0
C ← 0 -- We will remember the previous output ciphertext byte.
repeat
i ← (i + 1) mod 256
j ← (j + S[i] + C) mod 256 -- Use the previous ciphertext byte
... |
There's an IND-CPA SKE scheme 1 (Gen, Enc, Dec). Scheme 2 is defined as (Gen', Enc', Dec'), where Gen' = Gen, Enc'(k, m) = { 0||Enc(k, m) if m!=k; 1||k if m=k,
Dec'(k, 0||c) = Dec(k, c) and Dec'(k, 1||c) = c. How do I go about proving that the scheme 2 is IND-CPA secure?
I'm also having trouble understanding if th... |
Is there such thing as "hash reset sequence" that brings hash to the same known state?
A hash function has a state. In MD5 and others vulnerable to the length extension attack, the attack works by continuing computation from existing hash.
So, the question here is - when I continue computing hash, is it possible ... |
Is a hash "reset sequence" possible? |
There's an IND-CPA SKE scheme 1 $(\mathsf{Gen}, \mathsf{Enc}, \mathsf{Dec})$. Scheme 2 is defined as $(\mathsf{Gen}', \mathsf{Enc}', \mathsf{Dec}')$, where $\mathsf{Gen}' = \mathsf{Gen}$, $\mathsf{Enc}'(k, m) = 0||\mathsf{Enc}(k, m)$ if $m\ne k$ and $1||k$ if $m=k$,
$\mathsf{Dec}'(k, 0||c) = \mathsf{Dec}(k, c)$ and $\... |
Smart and Vercauteren proposed [a homomorphic encryption scheme (PKC 2010)][1] following Gentry's principles. Though their scheme can achieve fully homomorphism theoretically, they admitted that "for practical values of n our scheme cannot be made fully homomorphic" (p. 16).
However, perhaps the <s>only</s> (see u... |
I developing an encrypted messaging for [ZeroNet](http://zeronet.io) (P2P file-based network) and would like to have some guidelines if any of this could work.
My first idea:
- In ZeroNet every user has his/her own files signed by ECC this ensures the messages authenticity.
- When Bob visits the site first tim... |
Is this ECC based messaging method secure? |
The below equation is mentioned in [Homomorphic Encryption and the BGN Cryptosystem][1] (pdf, page 4):
> Mult(pk, $C_1$, $C_2$): Choose $u \xleftarrow{R} [1, n]$ and output $D = \hat{e}(C_1, C_2) \cdot e(Q, Q)^u \in \mu_n$.
I could not understand difference between $\hat{e}$ and $e$ without the hat. An explanat... |
I developing an encrypted messaging for [ZeroNet](http://zeronet.io) (P2P file-based network) and would like to have some guidelines if any of this could work.
My first idea:
- In ZeroNet every user has his/her own files signed by ECC this ensures the messages authenticity.
- When Bob visits the site first tim... |
I developing an encrypted messaging for ZeroNet (aP2P file-based network, website: zeronet.io) and would like to have some guidelines if any of this could work.
My first idea:
- In ZeroNet every user has his/her own files signed by ECC this ensures the messages authenticity.
- When Bob visits the site first ti... |
I've read the following paper and have one question on it.
[M. Luby and J. Staddon, "Combinatorial Bounds for Broadcast Encryption", EUROCRYPT'98.][1]
On page 523 (12th page of the paper) the authors say
> …there are at most $2^{tm}$ petals in $\mathcal{F}$ which don't split any of the blocks, $L_i$.
Howe... |
There is a java library for android which implements integrity checking to predefined encrypting mode(which can be found [here](https://github.com/tozny/java-aes-crypto)). In this case it is AES-CBC. The thing is that i can feed to Cipher.getInstance AES-GCM, too. Which, already have built-in integrity checking.
So... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol. The reference exposition seems to be: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, the Algebraic Eraser™, and lightweight cryptography_, in [Contemporary Mathematics
418 (2006), 1–34][1] (free [sligh... |
Status of Algebraic Eraser key exchange? |
I have a basic protocol which tries to authenticate messages going from client to server. Basically it is like this:
Imagine I want to send message M to server.
Client computes a MAC over the message. The MAC is basically DES_ECB encryption of data `MAC_DATA` length of which is 8 bytes. `MAC_DATA` is obtained
by X... |
I have a basic protocol which tries to authenticate messages going from client to server. Basically it is like this:
Imagine I want to send message M to server.
Client computes a MAC over the message. The MAC is basically DES_ECB encryption of data `MAC_DATA` length of which is 8 bytes. `MAC_DATA` is obtained
by X... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol.
The reference exposition seems to be: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, the Algebraic Eraser™, and lightweight cryptography_, in [Contemporary Mathematics
418 (2006)][1] (free [slightly... |
I have a basic protocol which tries to authenticate messages going from client to server. Basically it is like this:
Imagine I want to send message M to server.
Client computes a MAC over the message. The MAC is basically DES_ECB encryption of data `MAC_DATA` length of which is 8 bytes. `MAC_DATA` is obtained
by X... |
I have a basic protocol which tries to authenticate messages going from client to server. Basically it is like this:
Imagine I want to send message M to server.
Client computes a MAC over the message. The MAC is basically DES_ECB encryption of data `MAC_DATA` length of which is 8 bytes. `MAC_DATA` is obtained
by X... |
(Disclaimer: I'm an experienced server-side Java programmer, but with little crypto experience.)
Objective:
I've got a login server which, given a login+password pair, should issue a unique auth token. Using the same login+password pair multiple times should issue new unique tokens, all of them should be valid at... |
Is it OK to use a secret IV as key when creating keyed MD5 checksum for fixed-size data? |
(Disclaimer: I'm an experienced server-side Java programmer, but with little crypto experience.)
Objective:
I've got a login server which, given a login+password pair, should issue a unique auth token. Using the same login+password pair multiple times should issue new unique tokens, all of them should be valid at... |
Is it OK to use a secret IV as key when creating keyed MD5 checksum for fixed-size data?
Because data size is known, attacker cannot append anything. And I think it's hard to raise chosen-plaintext attack if the secret is well kept, but I’ld like to be sure. |
How can I judge the level of security with the following algorithm:
I create a 64 byte hash using SHA512 via some input. I use this hash to iterate over the plaintext, byte by byte, and similarly iterate over the hash byte by byte XORing each byte of the plaintext with a respective byte from the hash like this (in C... |
An IV is not a key.
In modes of operation, an IV does not have to be kept secret, and in order to decrypt everything you need the IV, which is transmitted in the clear.
The only required property of an IV is that it is unique, or at least with overwhelming probability unique. For that you can use "bad" randomness... |
(Disclaimer: I'm an experienced server-side Java programmer, but with little crypto experience.)
Objective:
I've got a login server which, given a login+password pair, should issue a unique auth token. Using the same login+password pair multiple times should issue new unique tokens, all of them should be valid at... |
No it's not. It is really bad.
Basically, this is a stream cipher, where your keystream is $key | key| key|key....$. This is really bad, similar to the level of "using OTP twice". As If you take a block of size keylength, and XOR two such blocks, then you get the XOR of the plaintexts. Depending on the nature of the... |
I will be implementing JSON web tokens into my website and have a question about implementing them. I have a choice of using two algorithms, HMAC-SHA256 and ECDSA-SHA256. I have used jwt using HMAC-SHA256 in the past, but now I noticed ECDSA is being added to a lot of jwt libraries. As someone who does not have a stron... |
The distinction is that ECDSA solves a problem that HMAC does not. If you need that problem solved, then you need to do ECDSA rather than HMAC; if you do not, then HMAC works just as well (and is a lot cheaper).
With HMAC, here is what we have: we have an authenticator that has a secret key. It takes a message, and... |
I will be implementing JSON web tokens into my website and have a question about implementing them. I have a choice of using two algorithms, HMAC-SHA256 and ECDSA-SHA256. I have used HMAC-SHA256 in the past for jwt, but now I noticed ECDSA is being added to a lot of jwt libraries. As someone who does not have a strong ... |
The distinction is that ECDSA solves a problem that HMAC does not. If you need that problem solved, then you need to do ECDSA rather than HMAC; if you do not, then HMAC works just as well (and is a lot cheaper).
With HMAC, here is what we have: we have an authenticator that has a secret key. It takes a message, and... |
I will be implementing JSON web tokens into my website and have a question about implementing them. I have a choice of using two algorithms, HMAC-SHA256 and ECDSA-SHA256. I have used HMAC-SHA256 in the past for jwt, but now I noticed ECDSA is being added to a lot of jwt libraries. As someone who does not have a strong ... |
A stream cipher transforms a key and a nonce/IV into a stream of pseudorandom bits (a "keystream"). The keystream can be XOR'd with the plaintext to produce the ciphertext (encryption), or XOR'd with the ciphertext to produce the plaintext (decryption). So, stream ciphers generally define two operations, encryption a... |
When we speak about 4096- or 2048-bit RSA keys, what part of the key is this number of bits? The public key comprises both the modulus and the public exponent, and the strength of the key can also be seen as depending on the length of the prime factors. Which of these is the "4096-bit" part? |
What part of an RSA key is referred to by the number of bits? |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol.
The reference exposition seems to be: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, the Algebraic Eraser™, and lightweight cryptography_, in [Contemporary Mathematics
418 (2006)][1] (free [slightly... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, the Algebraic Eraser™, and lightweight cryptography_, in [Contemporary Mathematics
418 (2006)][1] (free [slightly later pdf][... |
Is there a scheme where two ciphertexts (encrypted with different keys) can be proven to have the same (plaintext) content *without* disclosing the plaintext or any private keys? I assume that the public keys would need to be known.
This is for the purpose of detecting duplicated content on a server, without knowin... |
Is there a scheme where two cipher texts can be proven to have the same (unencrypted) content? |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, the Algebraic Eraser™, and lightweight cryptography_, in [Contemporary Mathematics
418 (2006)][1] (free [slightly later pdf][... |
Are there any FHE-MPC schemes implemented? |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
Are there any real-world E-voting systems in use with the Paillier cryptosystem? |
There are a lot of theories of Paillier cryptosystem with references to e-voting. Are there any real-world E-voting systems in use with the Paillier cryptosystem? |
How to compare the efficiency of public key cyrptosystems, i.e., RSA vs El Gamal? |
I am implementing client-side encryption for data stored in AWS DynamoDB, and was wondering about the correct use of AWS KMS for key management in addition to using AES/GCM.
I am using the master key stored in AWS KMS to generate a data key used for encryption. I am also using AWS KMS to generate a random number for... |
How to compare the efficiency of public key cryptosystems, i.e., RSA vs El Gamal? |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
I am working on assignment where I have specific scenarios and I am little bit struggling with this one.
Alice sends and email to Bob.For this e-mail, she uses the following method of encryption: each single word of the text is viewed as an integer number in binary, obtained by concatenating the 8-bit binary values of... |
I am working on assignment where I have specific scenarios and I am little bit struggling with this one.
Alice sends and email to Bob.For this e-mail, she uses the following method of encryption: each single word of the text is viewed as an integer number in binary, obtained by concatenating the 8-bit binary values ... |
How long does it take to decrypt an ECB encrypted message? |
Yes, you are in the ballpark with your assumptions.
> 1. I will store the `encryptedKey` with the encrypted data, but can I use the same key for all rows or do I need to generate a new one for each one?
No you can use the same key.
> 2. How does the AAD factor into this? Do I need to store it? Does it need to... |
There is a java library for android which implements integrity checking to predefined encrypting mode(which can be found [here](https://github.com/tozny/java-aes-crypto)).
> Short class description from [author page](http://tozny.com/blog/encrypting-strings-in-android-lets-make-better-mistakes/) to avoid further qu... |
There is a java library for android which implements integrity checking to predefined encrypting mode(which can be found [here](https://github.com/tozny/java-aes-crypto)).
> Short class description from [author page](http://tozny.com/blog/encrypting-strings-in-android-lets-make-better-mistakes/) to avoid further qu... |
How long does it take to decrypt an RSA/ECB encrypted message? |
I'm trying to sign/verify data between a C application and a Java application.
In java for now I was using the built-in JCE provider with `SHA256withRSA` as algorithm.
On the C part I'm using OpenSSL `RSA_sign`/`RSA_verify` methods with `NID_sha256` as type.
With this configuration I can't verify in my java ap... |
Currently a program is loading some files from an untrustworthy source (e.g. a CDN) which could have been tampered with. It has a known SHA-256 hash of the file stored locally, then it downloads the file from the CDN and compares the hash before loading the file into memory.
Because most of the SHA2 family suffers f... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
Currently a program is loading some files from an untrustworthy source (e.g. a CDN) which could have been tampered with. It has a known SHA-256 hash of the file stored locally, then it downloads the file from the CDN and compares the hash before loading the file into memory.
Because most of the SHA2 family suffers f... |
I'm trying to sign/verify data between a C application and a Java application.
In java for now I was using the built-in JCE provider with `SHA256withRSA` as algorithm. On the C part I'm using OpenSSL `RSA_sign`/`RSA_verify` methods with `NID_sha256` as type.
With this configuration I can't verify in my java appli... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
Is this a correct way of use symmetric encryption? |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
I am implementing a cryptographic protocol and I'd like to generate a set of seeds using a seed for a pseudo-random function. The reason is that I can pass on only one seed and it can be used to generate the other seeds.
As we know each derived seed is used to generate a set of pseudo-random values.
According t... |
I have given a pseudorandom Generator $G(s)$, $|s|=n$ whose expansion $l(n)$ is $>2n$. I also know that $G^\prime(s) := G(s_1,\ldots,s_{\lfloor\frac{n}{2}\rfloor})$ is a pseudorandom generator. Now the function
$\begin{equation}L(s) := G(s) ~||~ G(s+1)\end{equation}$
with $||$ being concatenation is supposed to ... |
Given PRNG $G(s)$, why is $G(s) || G(s+1)$ not a PRNG? |
I recently read Ran Canetti's famous UC paper but I'm still trying to wrap my head around the concepts. I think [this answer](http://crypto.stackexchange.com/a/29388) has me confused a bit, particularly where it says
> The stand-alone simulation-based definitions give you security under sequential composition, and... |
I am implementing a cryptographic protocol and I'd like to generate a set of seeds using a seed for a pseudo-random function. The reason is that I can pass on only one seed and it can be used to generate the other seeds.
As we know each derived seed is used to generate a set of pseudo-random values.
According t... |
...or is that possible? I am very new to cryptography! But, I think it's verrrrrrry interesting!! I have autism and numbers "are my thing" :)
I already understand a couple of things...like I know you can get the x/y or x or y from your public hex address...but can you get anything like that from the secret exponent?? ... |
Is it possible to get my x,y coordinates from my "secret exponent"? |
I am trying to understand how a POODLE attack would actually be implemented. In the original security advisory from Möller, Duong and Kotowicz [[POODLE 14][1]] the following example is presented:
> Assume that each block $C$ has 16 bytes, {..}. The MAC size in SSL 3.0 CBC cipher suites is typically 20 bytes, so belo... |
...or is that possible? I am very new to cryptography! But, I think it's verrrrrrry interesting!! I have autism and numbers "are my thing" :)
I already understand a couple of things...like I know you can get the x/y or x or y from your public hex address...but can you get anything like that from the secret exponent?? ... |
I am trying to understand how the POODLE attack would actually be implemented. In the original security advisory from Möller, Duong and Kotowicz [[POODLE 14][1]] the following example is presented:
> Assume that each block $C$ has 16 bytes, {..}. The MAC size in SSL 3.0 CBC cipher suites is typically 20 bytes, so be... |
How does padding oracle attack work with bytes larger than possible length? |
...or is that possible?
I am very new to cryptography! But, I think it's very interesting!! I have autism and numbers "are my thing" :)
I already understand a couple of things. For example I know you can get the $x/y$ or $x$ or $y$ from your public hexadecimal address, but can you get anything like that from the... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
In CPA model, we assume Eve has access to an oracle who has the correct key and Eve can send query to the oracle to encrypt in CPA the data.
However, what if Eve only has access to a different oracle who does not have the correct key. But Eve can plug in any key Eve likes. Moreover, assume this encryption algorithm... |
Does CPA attack assumption requires the oracle to have the key? |
Brute-force attacking One Time Pads feasible? |
I'll answer your question in order of appearance and leave the ones out which are off-topic here.
> For example I know you can get the $x/y$ or $x$ or $y$ from your public
> hexadecimal address, but can you get anything like that from the
> secret exponent?
Not directly. You can use the secret exponent (a.k.a. ... |
I'm volunterely working for a crypto library and we're planning on adding Curve25519 support (finally). At the same point I had the idea of adding support for EdDSA in the same run.
Our library is highly modular, so the question needs to be asked:<br>
**Is there any (good) reason to limit the use of EdDSA solely to... |
Is there any reason not to use EdDSA with Weierstrass curves? |
> What does this mean, exactly?
In UC security, the adversary is allowed to talk to the environment during the execution of the protocol. So the environment models "everything else happening in the universe" during the protocol execution. For instance, an adversary could be concurrently running other protocols with ... |
In CPA model, we assume Eve has access to an oracle who has the correct key and Eve can send query to the oracle to encrypt in CPA the data.
Assume this encryption algorithm is a plain ECB mode AES and eve knows about it, i.e., if Eve plug in a key to AES-ECB and apply the same data for encryption twice, Eve will b... |
For AES CBC, can I encrypt the IV with AEC ECB and the same key and include it with the message? |
Is it safe to generate the IV as the following?
1. It's like the real IV is all zeros.
2. The first block of data will be a low-entropy but unique data.
3. Once the first block is encrypted, the ciphertext will look like a random sequence of bytes that will authomatically serve as IV of the second block
This wo... |
Is it safe to use AES-CBC like this? |
For a CBC mode cipher, which is what POODLE applies to, you **don't encrypt or decrypt <br>individual bytes, but rather blocks**, formed by adding padding to the actual data bytes. <br>For encryption in general every byte can be any value 0 to 255, and the SSL spec allows the padding_length byte to be almost any value,... |
For a CBC mode cipher, which is what POODLE applies to, you **don't encrypt or decrypt <br>individual bytes, but rather blocks**, formed by adding padding to the actual data bytes. <br>For encryption in general every byte can be any value 0 to 255, and the SSL spec allows the padding_length byte to be almost any value,... |
It seems you want to make the IV secret for security purposes, in direct opposition to common knowledge and NIST recommendation that non secret keying material (such as a non-secret initialization vector) be... non secret.
>So that goes against some of the wisdom espoused a few years ago by Bart Preneel in this vide... |
Which is better? Serialize and then encrypt or Encrypt and then Serialize |
Is it safe to generate the IV for AES-CBC as the following?
1. It's like the real IV is all zeros.
2. The first block of data will be a low-entropy but unique data.
3. Once the first block is encrypted, the ciphertext will look like a random sequence of bytes that will automatically serve as IV of the second block... |
> What does this mean, exactly?
The purpose of the environment is to model "everything else happening in the universe" besides the protocol execution. In the UC model, the adversary is allowed to talk to the environment *during* the execution of the protocol. So UC security means "security no matter what else is goi... |
Algebraic Eraser™ is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group.
An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t... |
This issue claims that 7zip does not use any salt with its key derivation function: https://github.com/magnumripper/JohnTheRipper/issues/1679
If that's true, wouldn't that mean you can crack multiple 7z files at very little extra cost?
|
I am trying to understand the CTR DRBG specification in [NIST SP 800-90A][1]. It seems slightly different to a pure stream cipher in that the key and counter are reset after each generate call using the output pseudo-random bits. I understand that this is to provide backtracking resistance.
My question is, does this... |
CTR DRBG dependent on request size? |
What are the state of the art techniques for Anonymous Authentication? What are the most popular ones? The problem domain I am considering is with respect to different users accessing cloud content; lets say watching movies in netflix. I am looking for schemes that prevents linkability, and also schemes that allows lin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.