instruction stringlengths 15 30k |
|---|
I'm very curious to know this and a bit confuses too:
1. Suppose, I have two files encrypted using AES-128bit with keys PBKDF2-derived from the same password and the same salt. If an attacker does brute force attack (imagining that he finishes this)
to crack the keys, I'm guessing he needs to run the attack once to... |
I understand that the public key does not expose the private key. That is not the question.
The question is: Given a EC public key, can a different, but *plausible* and *functional* private key be derived to match the public key?
In other words:
In basic arithmetic, if you know ```a x b = c```, and you know ... |
Can a EC private key be derived from a public key? |
> Could Eve capture Bob's public key, then derive some different private key to correspond to it, and then impersonate Bob by saying "I am Bob, and here's my public key." Even though Eve doesn't have Bob's private key, she's able to produce some other private key that's compatible with Bob's public key?
No, not unle... |
> Given a EC public key, can a different, but plausible and functional private key be derived to match the public key?
No, a public key will correspond to only one private key (with one minor exception, which I will explain below). With Elliptic Curve systems, the private key is an integer $d$ between 1 and $q$ (th... |
> Given a EC public key, can a different, but plausible and functional private key be derived to match the public key?
No, a public key will correspond to only one private key (with one minor exception, which I will explain below). With Elliptic Curve systems, the private key is an integer $d$ between 1 and $q$ (th... |
To be clear, I have access to $H(S)$ and as many $H(S||K)$ as I want. Every string $K$ is known. Can I use the extra information to my advantage and try to deduce $S$, without requiring bruteforce? Or do you still have to bruteforce but try less combinations since you have more information? |
I'll give another answer in case you or someone else needs to work with that version of OCB and/or Bouncy Castle.
> My understanding of this check is that if the nonce is longer than 16 bytes, or the nonce is 16 bytes and the first bit of the first byte of the nonce is not 0 (assuming big endian), then an error is t... |
I am following the [Coursera Cryptography I course](https://class.coursera.org/crypto-011/) and I have the following question,
I am a bit perplexed by the statement, in week 2 lecture "[What are block cyphers?](https://class.coursera.org/crypto-011/lecture/12)" that a counter-mode PRF is a secure PRG.
PRPs are PR... |
In `TripleDES` it requires `168bit` key in option 1. I don't enter three single `56bit` keys while implementing instead I only enter `168bit` key. So, I'm guessing `168bit` breaks into three `56bit` keys. What it process of this breaking mechanism? is it linear? |
I used `TripleDES` so many times but never thought about this. In `TripleDES` it requires `168bit` key in option 1. I don't enter three single `56bit` keys while implementing instead I only enter `168bit` key. So, I'm guessing `168bit` breaks into three `56bit` keys. What it process of this breaking mechanism? is it l... |
I came out with a simple idea but I don't know if it is really secure or not. First of all, sorry for my bad english. Second: I know that you shouldn't create any algorithm on your own. I'm just curious, that's all.
Algorithm explanation:
- First of all, Alice and Bob agree on a common secret password, lets say P... |
Rate my idea: is that a stronger GPG-like algorithm? |
Yes. The keys are indeed used in a linear manner.
In particular, they are used in e-d-e mode (encrypt using first 56 bits, decrypt using next 56 bits and then again encrypt using final 56 bits).
This way its possible to achieve DES, 2-DES and 3-DES variations.
It also appears that the last bit of each byte is... |
I read the claim, without proof, that it is possible to construct a next bit predictor for any PRNG given an oracle distinguisher for that PRNG and vice versa. How do I prove that?
A distinguisher takes a bitstring and tells you if it was generated by the PRNG or not.
A next bit predictor takes a bitstring and tel... |
I came up with a simple idea but I don't know if it is really secure or not. I know that you shouldn't create any algorithm on your own. I'm just curious, that's all.
Algorithm explanation:
- First of all, Alice and Bob agree on a common secret password, lets say P1 (this should be done using a secure channel, li... |
Is KDF based on HMAC-SHA-256(Hashed Message Authentication Code, Secure Hash Algorithm) algorithm a suitable option to generate symmetric key from the secret key?
What is the basic funda, behind using KDF after getting the secret key. Can the secret key itself be used as the symmetric key. |
Amy and Betty have a shared key, and the protocol bellow is to provide a mutual authentication for both Betty and Amy. Bellow is the protocol.
A sends B : na I am Amy...here is a nonce
B sends A : nb+E(k,na) here is another nonce... your nonce encrypted with k
A sends B : E(k,nb) OK...here is your nonce encryp... |
Does there exist a cipher that can be encrypted twice with two different keys and then decrypted twice using either key first?
For example:
Plaintext is "Lemons are great!"
Encode with Key #1
Encode with Key #2
Decode with Key #1
Decode with Key #2
Result is "Lemons are great!"
To ... |
Amy and Betty have a shared key $k$, and the protocol below is to provide a mutual authentication for both Betty and Amy.
1. A sends B : $na$
2. B sends A : $nb | E(k, na)$
3. A sends B : $E(k, nb)$
Where
- $na$ is a nonce from Amy
- $nb$ is a nonce by Betty
Can spoofing take place here where... |
Most descriptions that explain how streamciphers work (like [the one on Wikipedia](http://en.wikipedia.org/wiki/Stream_cipher)), tend to describe a model that boils down to a simple “$ciphertext = plaintext \oplus stream$”, where the stream is determined by a nonce and a key, while the plaintext and ciphertext do not a... |
It seemed to me that the Bouncy Castle `SecureRandom` class for C#/.NET only uses `DateTime.Now.Ticks` as its seed by default.
I was wrong, but wouldn't that be unsafe to do?
|
> Are there performance, size, or power efficiencies from one curve to another?
The larger the curve, the larger the keys and signatures, and likely the slower the computations. There are exceptions to the last one – curve parameters do affect how efficiently they can be implemented, so some curves with good paramet... |
I've been doing the security proof for one of my Theorem. Basically, given
$g^a$, $g^b$, $g^{cb}$, $g$ and $c$ as known values. Is the problem of computing $g^{acb^{-1}}$ equivalent to the Diffie Hellman-problem? In other words, is this easy to compute that?
My feeling is that its similar to the harder problem of t... |
Security equivalent to Diffie–Hellman problem? |
I have a few requirements for a password reset system, along with some questions at the end as to its security.
## Requirements
The aim is to provide a password reset mechanism satisfying the following properties:
1. Multiple tokens per user, to allow for email delays to not cause confusion.
2. Tokens are sin... |
I read about the following ["safe" ECC curves][1] and notably, secp256 and all the NIST curves are marked as "unsafe" when compared to more modern curves.
I need a curve for signing or encryption, (or both) but not sure how to choose from the following:
* M-221
* E-222
* Curve1174
* Curve25519
* E-382
* M-... |
I was working with some encryption and I decided to put a spin. To preface this would be used to encrypt multiple files.
You start with a key file generated from random data. For example you could generate a 288 byte key file. This file contains 9 sub-keys each 256-bits.
For each file to encrypt you securely rand... |
I was thinking of doing symmetric encryption using just hashing and simple XOR encryption. It would work as:
1. Alice and Bob share a symmetric key
2. Alice manages to send an (authenticated) IV to Bob
3. Bob and Alice both combine the IV with the symmetric key and use it to seed a PRNG
4. the output of the PRNG ... |
Amy and Betty have a shared key $k$, and the protocol below is to provide a mutual authentication for both Betty and Amy.
1. A sends B : $n_a$
2. B sends A : $n_b \;\|\; E(k, n_a)$
3. A sends B : $E(k, n_b)$
Where
- $n_a$ is a nonce from Amy
- $n_b$ is a nonce by Betty
Can spoofing take place... |
Your idea for constructing a distinguisher from a predictor is fine, assuming you know that the predictor predicts the last bit. The more general statement is: if you can predict any bit of the output, say the $i$th bit, given the first $i-1$ bits, then you can also build a distinguisher. A similar idea to what you s... |
I am examining a protocol that uses CRC32 as a MAC which CRC32 is part of the encrypted data. For encryption 3DES is used. I am aware of the weaknesses of this method but I would nevertheless like to see if it is just weak or actually relatively easily to break.
The examined protocol has the format more or less of:
... |
Is there a generic attack on encrypted CRC32 when used as a MAC? |
Please bear with me, I'm new to this: I have multiple devices connecting to a server, whos communication needs to be encrypted, at the moment I have an AES library doing the job (possibly inadaquately): I am using a database of keys on the server, that correspond to the keys stored on the devices (one per device).
... |
Please bear with me, I'm new to this: I have multiple devices connecting to a server, whos communication needs to be encrypted, at the moment I have an AES library doing the job (possibly inadaquately): I am using a database of keys on the server, that correspond to the keys stored on the devices (one per device).
... |
I have multiple devices connecting to a server, whose communication needs to be encrypted. At the moment I have an AES library doing the job (possibly inadequately): I am using a database of keys on the server, that corresponds to the keys stored on the devices (one per device).
Each message from the device to the ... |
> Will the presence of this "secret" (presuming it is the same in every message coming from that device, and in the same location within the message) cause repeating patterns in the ciphertext making some form of attack possible?
As long as the AES mode uses an IV and the IV is different for each message, there wil... |
I was reading this [paper][1]. In the table-1 of the paper it says TripleDES (showing both 128bit and 168bit keysize) is vulnerable to Differential Cryptanalysis. It also says that AES (showing all three keysize) is strong against Differential Cryptanalysis. If AES-128bit is secure against Differential Cryptanalysis t... |
Is TripleDES 168bit vulnerable to Differential Cryptanalysis? |
> Is there a vastly simpler way?
I think so.
Let the server send a reset token in the following form:
(deadline, HMAC(server key, id_user || S || deadline))
That is, the server calculates an authenticator that allows `id_user` to change their secret from `S` before `deadline`. The key used should be onl... |
The [Rijndael specification][1] details the design choices for the s-box in section 7.2. They describe the choice of affine mapping as follows:
> We have chosen an affine mapping that has a very simple description per se, but a
complicated algebraic expression if combined with the ‘inverse’ mapping. It can be seen ... |
How to calculate time and space complexity of ElGamal encryption and decryption as there are two exponentiation operation during encryption and one during decryption? Here is my code for encryption:
for i=1:d
pow=pow*g;
y=pow%p;
for j=1:r
pow1=pow1*g;
C1=pow1*g;
... |
Recently I'm reading this [paper][1], it's very hard for me to go further. Especially the proof of knowledge. Actually, I never meet this concept before. There are two extended concepts to the proof of knowledge in the paper, i.e. joint proof of knowledge and non-malleable joint proof-of-knowledge, which are abbreviat... |
Recently I've been reading the paper [*“A New Family of Implicitly Authenticated Diffie-Hellman Protocols”*][1]. It's very hard for me to go further. Especially when it comes to the proof of knowledge. Actually, I never meet this concept before.
There are two extended concepts to the proof of knowledge in the paper... |
I have a few requirements for a password reset system, along with some questions at the end as to its security.
## Requirements
The aim is to provide a password reset mechanism satisfying the following properties:
1. Multiple tokens per user, to allow for email delays to not cause confusion.
2. Tokens are sin... |
Use AES-256 Or AES-CTR-256 For One Block? |
This may be a very simple question, but I have not found info about this in any place. My question is about CTR mode: When it says IV+1... How do we make this operation? For example, if I have the IV value $\texttt{69dda8455c7dd4254bf353b773304eec
}$ (hex-encoded), what would be the result of IV+1? I think that we mus... |
How do we operate IV+1? |
How can receiver of an email check the integrity using the sender's public key? |
PGP message integrity : How can receiver of an email check the integrity using the sender's public key? |
This may be a very simple question, but I have not found info about this in any place. My question is about CTR mode: When it says $IV+1$… How do we make this operation?
For example, if I have the IV value $\texttt{69dda8455c7dd4254bf353b773304eec}$ (hex-encoded), what would be the result of $IV+1$?
I think that... |
I have a few requirements for a password reset system, along with some questions at the end as to its security.
## Requirements
The aim is to provide a password reset mechanism satisfying the following properties:
1. Multiple tokens per user, to allow for email delays to not cause confusion.
2. Tokens are sin... |
> Is there a vastly simpler way?
I think so.
Let the server send a reset token in the following form:
(deadline, HMAC(server key, id_user || S || deadline))
That is, the server calculates an authenticator that allows `id_user` to change their secret from `S` before `deadline`. The key used should be onl... |
Here's an authentication scheme I had in mind that combines the simplicity of [HTTP Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication) and the security of real crypto primitives. I have in mind the user-level authentication, ie login/password, not the TLS level.
I'd like to see if any... |
Validity of authentication scheme? |
> Would that scheme be sound to implement ? Are there any flaws that would make it foolish ?
I believe it's sound.
> I guess the most important thing to consider here is whether the salt generation is "random enough" to accommodate even the worst case (everyone has the same password)
A 256-bit random number is... |
> Would that scheme be sound to implement ? Are there any flaws that would make it foolish ?
I believe it's sound.
Note that [SRP][1] is a proven authentication protocol that has similar security characteristics. It has more round-trips, though.
> I guess the most important thing to consider here is whether th... |
Suppose Alice knows a secret number $a$, and Bob knows a secret number $b$.
Is there a simple way for Alice and Bob to know who has the lowest number, without Alice & Bob exchanging their numbers ? |
I am examining a protocol that uses CRC32 as a MAC (see note 1) the weaknesses of this method but I would nevertheless like to see if it is just weak or actually relatively easily to break.
The examined protocol has the format more or less of:
> Plaintext = Headers (6 bytes) || CRC (4 bytes) || Data
> Cipherte... |
I am examining a protocol that uses CRC32 as a MAC (see note 1) the weaknesses of this method but I would nevertheless like to see if it is just weak or actually relatively easily to break.
The examined protocol has the format more or less of:
Plaintext = Headers (6 bytes) || CRC (4 bytes) || Data
Cipher... |
I am working on a Block Storage system, where I have the need to encrypt and authenticate blocks by a client, but also want the server to be able to detect bit corruption while minimizing the work done on the data. The storage blocks are roughly 1MB segments.
One option is to let the client use a AE(AD) cipher (like... |
I am working on a Block Storage system, where I have the need to encrypt and authenticate blocks by a client, but also want the server to be able to detect bit corruption while minimizing the work done on the data. The storage blocks are roughly 1MB segments.
One option is to let the client use a AE(AD) cipher (like... |
I am working on a Block Storage system, where I have the need to encrypt and authenticate blocks by a client, but also want the server to be able to detect bit corruption while minimizing the work done on the data. The storage blocks are roughly 1MB segments.
One option is to let the client use a AE(AD) cipher (like... |
I am working on a Block Storage system, where I have the need to encrypt and authenticate blocks by a client, but also want the server to be able to detect bit corruption while minimizing the work done on the data. The storage blocks are roughly 1MB segments.
One option is to let the client use a AE(AD) cipher (like... |
This may be a very simple question, but I have not found info about this in any place. My question is about CTR mode: When it says $IV+1$… How do we make this operation?
For example, if I have the IV value `69dda8455c7dd4254bf353b773304eec` (hex-encoded), what would be the result of $IV+1$?
I think that we must ... |
> I haven't seen much analysis on using ordinary hashes for content authentication. Can anyone can give me a pointer on whether this is safe?
With good choice of primitives it is. Public key signatures use a hash function in a similar way to identify the message signed.
However, where a MAC only needs what amount... |
> I haven't seen much analysis on using ordinary hashes for content authentication. Can anyone can give me a pointer on whether this is safe?
With good choice of primitives it is. Public key signatures use a hash function in a similar way to identify the message signed.
However, where a MAC only needs what amount... |
I am working on a Block Storage system, where I have the need to encrypt and authenticate blocks by a client, but also want the server to be able to detect bit corruption while minimizing the work done on the data. The storage blocks are roughly 1MB segments.
One option is to let the client use a AE(AD) cipher (like... |
I've devised a PRG using [Bezier curves](http://en.wikipedia.org/wiki/B%C3%A9zier_curve) , constructed with [Bernstein polynomials](http://en.wikipedia.org/wiki/Bernstein_polynomial), and I was wondering if you guys could help me with some suggestions or constructive criticism.
Basicly I take a random set of 2d poin... |
Is my implementation of a PRG at least intuitively secure? |
PRNGs are a difficult and hot topic.
Some tests can be found here: [What tests can I do to ensure my PRNG is working correctly?][1]
But they do not tell you (or others) if your PRNG is really secure. A PRNG must be build in a way, that a third party is not able to "calculate" former or upcoming PRNG output based ... |
I'd like to know whether the following modified CBC-MAC is secure (given a fixed IV).

Are there some obvious attacks I can't see?
Thanks
|
I'd like to know whether the following modified CBC-MAC is secure (given a fixed IV).

Are there some obvious attacks I can't see?
|
I'd like to know whether the following modified CBC-MAC is secure (given a fixed IV).

Are there some obvious attacks I can't see?
Source: Some old course on Network Security found on the Internet
https://sites.google.com/site/hayashulman/2012/89690
|
I'd like to know whether the following modified CBC-MAC is secure (given a fixed IV).
>
<sup>Source: an old [course on Network Security](https://sites.google.com/site/hayashulman/2012/89690)</sup>
Are there some obvious attacks I can't see?
|
I've been wondering what would happen if the RSA modulus would be $n=p^2q$ instead of $n=pq$. I feel like there is an obvious security flaw (as there is with most modifications). Would this choise of $n$ make RSA less secure? If so, why? If not, then why isn't $n=p^2q$ standard since it allows operations on a bigger $\... |
<h2> Diffie Hellman </h2>
[Diffie Hellman](http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange) is a key exchange protocol. It is an **interactive** protocol with the aim that two parties can compute a common secret which can then be used to derive a secret key typically used for some symmetric encryption schem... |
Given that we know that nonce + message + hash all inside the cypher stream makes it possible to detect if any bits of the message have been changed by the attacker (in essence converting a malleable cipher into a non-malleable one), why do they still say encrypt then MAC?
Furthermore, doesn't adding the identifier ... |
Why is MAC using nonce + message + hash(nonce + message + identifier) not the standard? |
Given that we know that `nonce + message + hash` all inside the cypher- stream makes it possible to detect if any bits of the message have been changed by the attacker (in essence converting a malleable cipher into a non-malleable one), why do they still say encrypt then MAC?
Furthermore, doesn't adding the identifi... |
Why is MAC using nonce+message+hash(nonce+message+identifier) not the standard? |
Given that we know that `nonce + message + hash` all inside the cypher- stream makes it possible to detect if any bits of the message have been changed by the attacker (in essence converting a malleable cipher into a non-malleable one), why do they still say encrypt then MAC?
Furthermore, doesn't adding the identifi... |
Given that we know that `nonce + message + hash(nonce + message + identifier)` all inside the encryption makes it possible to detect if any bits of the message have been changed by the attacker (in essence converting a malleable cipher into a non-malleable one), why do they still say encrypt then MAC?
Furthermore, d... |
Given that we know that `nonce + message + hash(nonce + message + mac-key)` all inside the encryption makes it possible to detect if any bits of the message have been changed by the attacker (in essence converting a malleable cipher into a non-malleable one), why do they still say encrypt then MAC?
Furthermore, does... |
Given that we know that `nonce + message + hash(nonce + message + mac-key)` all inside the encryption makes it possible to detect if any bits of the message have been changed by the attacker (in essence converting a malleable cipher into a non-malleable one), why do they still say encrypt then MAC?
Furthermore, does... |
Which algorithm do you recommend for practical use to generate unique passwords for each website? |
I need to store a string of digits (0-9) of a fixed size in my database securely.
I've dabbled somewhat into looking into salted hashes, but I don't think it will make much of a difference in this case. I've also already performed a rainbow table attack on a plain hash, and it broke it in a matter of seconds.
On... |
I need to store a string of digits (0-9) of a fixed size in my database securely.
I've already performed a rainbow table attack on a plain hash, and it broke it in a matter of seconds.
One option I had was to break the string into 2 or more parts and store them separately, within reason (i.e do not have the reso... |
It'll be the same situation that NY City suffered some days ago: when you have little variability on your data, i.e., they have a fixed-small size, it'll always be fast to brute force.
You don't say how long your number is, so I'll assume it can range from 0 - 10,000,000,000 (so, a unique number for each human being... |
It'll be the same situation that NY City suffered some days ago: when you have little variability on your data, i.e., they have a fixed-small size, it'll always be fast to brute force.
<del>You don't say how long your number is, so I'll assume it can range from 0 - 10,000,000,000 (so, a unique number for each human ... |
We learned that length padding was used in Merkle-Damgard where after padding with zeros another block is added that contains the initial length of the input. This is supposed to prevent same hash values for the different inputs $x \ne x0..0$.
Then again for Keccak we learned it is possible to use simple padding (e.... |
I remember $e=3$ is a bad choice for textbook RSA. But I can't really recall why. What happens if I choose $e=3$? Can I retrieve the message by simply calculating $\sqrt[3]{c}$? Why can't I do that with bigger $e$s? Is it possible to retrieve $d$, $p$ or $q$?
I remember that we had something with the Chinese Remaind... |
> What happens if I choose $e=3$? Can I retrieve the message by simply calculating $\sqrt[3]{c}$?
Yes, if the plaintext message is smaller than $\sqrt[3]{N}$, then yes, a simple computation of $\sqrt[3]{C}$ will recover the original message.
> Why can't I do that with bigger $e$'s?
Actually, you could... as lo... |
> Isn't it still possible to find two different inputs that will be padded to the same value and then deliver the same hash?
Well, no, it isn't. Given a padded message (that is, padded by adding a 1 bit, and then as many 0 bits as needed to fill it out to a multiple of the internal block size), we can unambiguously... |
Consider the function $F$ from $\{0,1\}^{56}$ to $\{0,1\}^{64}$, mapping the operative bits of a DES key to the ciphertext for all-zero plaintext. How could we organize a [rainbow table][1] to invert that function with high probability, low computational cost, and a reasonably-sized table that can be constructed at rea... |
Rainbow table for DES with all-zero plaintext? |
Consider the function $F$ from $\{0,1\}^{56}$ to $\{0,1\}^{64}$, mapping the operative bits of a DES key to the ciphertext for all-zero plaintext. How could we organize a [rainbow table][1] to invert that function with high probability, low computational cost, and a reasonably-sized table that can be constructed at rea... |
The article [here][1] says below, about a universal hashing technique based on matrix multiplications.
*"However, there is a little known method based on using a random matrix. It has lots of advantages - it's a universal family"*
I tried to hard to find the source paper of the same to dig deeper but could not.... |
I have general questions regarding rolling codes. Basically there is a sender and a reciever. Both have a sequence generator. The reciever checks if the recieved sequence matches the newly generated. An example used is KeeLoq.
Assuming a car opener (sender) and a car (reciever):
- What happens if the sender is at... |
How does rolling code works? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.