instruction stringlengths 15 30k |
|---|
What are the dangers of predictable (repeated) plaintext structures? |
When using a "good", modern cipher (specifically one that provides ciphertext indistinguishability), is it a problem at all if there is some well-known structure in all plaintexts?
For example, consider a simple protocol that transmits many messages that all start with an identical, but secret string. All of the mes... |
Within a closed computer network, I am ciphering some plaintext data as an added security measure. This is below several other layers of protection. For various technical reasons, I am restricted to plain-text, UTF-8 data. To that end, I have been using a Vigenère cipher with pre-shared key database. The keys range fro... |
I have a two set of key {36,77} and {50,117},
How can validate if it is a valid RSA public keys?
Is there any simple method? |
How to jusify {e,n} is a valid RSA public key? |
I am trying to implement MISTY1. It's RFC, [RFC2994][1], contains psuedocode that I basically copy and pasted into Code::Blocks. However, I managed to mess that up somehow. After 2 days, I still have not figured out what i did wrong (Im probably being blinded by familiarity).
The RFC provides 2 test vectors, but onl... |
I am trying to implement MISTY1. It's RFC, [RFC2994][1], contains psuedocode that I basically copy and pasted into Code::Blocks. However, I managed to mess that up somehow. After 2 days, I still have not figured out what i did wrong (Im probably being blinded by familiarity).
The RFC provides 2 test vectors, but onl... |
In Advanced Encryption Standard, If I used "Counter Mode", in it's nonce value, what should I do?
ex. should I divide the nonce value into two? ex. I have 128-bit of nonce, should I divide it from two? that will turn into 64-bit each?
the first 64-bit is my chosen nonce value.. ex: a0a1a2a3a4a5a6a7
and the secon... |
What's the practical status of [MD5][1] w.r.t. [second-preimage][2]?
Integrity of a piece of data is protected by an MD5 hash, itself assumed genuine. The data (and thus the hash) is known to the adversary. The adversary can change the data, and wants to do that while leaving the hash identical. Denote the data size... |
Is a second preimage attack on MD5 feasible? |
What's the practical status of [MD5][1] w.r.t. [second-preimage][2]?
Integrity of a piece of data is protected by an MD5 hash, itself assumed genuine. The data (and thus the hash) is known to the adversary. The adversary can change the data, and wants to do that while leaving the hash identical. Denote the data size... |
What's the practical status of [MD5][1] w.r.t. [second-preimage][2]?
Integrity of a piece of data is protected by an MD5 hash, itself assumed genuine. The data (and thus the hash) is known to the adversary. The adversary can change the data, and wants to do that while leaving the hash identical. Denote the data size... |
Suppose I am storing a number of encrypted documents in a database. I would like to make it possible to identify the subset of documents whose contents match user-specified search terms without a) maintaining a plaintext index or b) decrypting documents on the fly. Is there any way to accomplish this securely? |
Is it possible to match encrypted documents using user-defined search terms? |
Suppose I am storing a number of encrypted documents in a database. I would like to make it possible to identify the subset of documents whose contents match user-specified search terms without a) maintaining a plaintext index or b) decrypting documents on the fly. Is there any way to accomplish this securely?
By th... |
The following simple "check" algorithms are popular for detecting accidental errors.
The following algorithms are "position sensitive", allowing them to detect the common error of accidentally swapping 2 consecutive digits (an error that a simple checksum -- adding up the digits -- can't detect).
In increasing orde... |
It might help if you explain what problem you're trying to solve.
For example, what exactly do you mean "Key1 = Key2|Key3"? If you mean (say) taking a 256 bit AES key, and splitting it up into two halves (where you need to present both halves to encrypt/decrypt), well, that's easy; however, I doubt that's what you'... |
This is a follow-up question to http://crypto.stackexchange.com/questions/3404/does-tls-use-rc4-dropn.
As mentioned in section 6 of [RFC4345][1], there are weak distinguishers for RC4 keystreams available that even work for keystreams that originate from different keys, and regardless of the distance from the start ... |
Is RC4 a problem for password-based authentication? |
[Blum-Blum-Shub](https://en.wikipedia.org/wiki/Blum_blum_shub) is a stream cipher: given a short key, it produces an effectively unlimited-length stream of pseudorandom bits. Other well-known examples of stream ciphers include AES-CTR and RC4.
Blum-Blum-Shub gets mentioned a lot by non-expert cryptographers. I sus... |
Following on from D.W.'s comments on [a previous question][1], what properties does Blum Blum Shub have that make it better / worse than other PRNGs? Are there significant implementation difficulties or security issues with BBS?
[1]: http://security.stackexchange.com/questions/18033/how-much-are-phps-rand-functi... |
By George, you're on to something.
To answer the question you asked, I don't know of anyone actually attempting to recover a password this way, or it even being discussed. However, it does appear to be feasible, given enough encrypted streams.
How many are enough? Well, I've started running a few simulations; p... |
Can we use a polynomial P(x) to securely communicate ?
For example Alice & Bob agree on a degree of a polynomial. The value x & the coeficients are generated from a seed using a hash function or any other PRG and change in each communication, the plaintext m is hidden into P(x). For example P(x) = ax²+b(m)x+c
al... |
Can we use a polynomial $P(x)$ to securely communicate ?
For example Alice & Bob agree on a degree of a polynomial. The value $x$ & the coeficients are generated from a seed using a hash function or any other PRG and change in each communication, the plaintext $m$ is hidden into $P(x)$. For example $P(x) = ax^2+b(m... |
According to the specification of RFC 4764, contents in EAP thrid message and forth message are required to encrypted by AES-128 EAX mode (also called protected channel). In RFC4764, the length of ciphertext is as the same as the length of paintext. However, the test vectors in The EAX Mode of Operation show that the c... |
I was playing around with a problem in e-voting schemes that use additive homomorphic encryption to tally votes, namely that at the end of the day somebody (or somebodies, if the secret material has been broken up somehow) has to be trusted to decrypt the final tally.
Looking at ElGamal's additive variant, reproduce... |
I was playing around with a problem in e-voting schemes that use additive homomorphic encryption to tally votes, namely that at the end of the day somebody (or somebodies, if the secret material has been broken up somehow) has to be trusted to decrypt the final tally.
Looking at ElGamal's additive variant, reproduce... |
How long does it take to extract a key from a FIPS-140 Level 2 device? What records are there of successful extraction? How much did the first extraction from a given device cost? How much would a subsequent extraction cost?
Dr. Google is usually very helpful on questions like this but he isn't helping me here. Any ... |
How long does it take to extract a key from a FIPS-140 Level 2 device? |
I was playing around with a problem in e-voting schemes that use additive homomorphic encryption to tally votes, namely that at the end of the day somebody (or somebodies, if the secret material has been broken up somehow) has to be trusted to decrypt the final tally.
Looking at ElGamal's additive variant, reproduce... |
Alright Ive been working on this one for a while
I found φ(60131) to be 97294
½(60131+60131(5)^.5) = 97294
then I worked through the GCD
GCD(985,97294) = 1
97294 = 985*98+764
985=764*1+221
764 = 221*3+101
221 = 101*2+19
101=19*5+6
19= 6*3+1
6 = 1*6 GCD = 1
No... |
I recently read the article [Nonce-Based Symmetric Encryption](http://www.cs.ucdavis.edu/~rogaway/papers/nonce.pdf) by Rogaway, where he presents two different notions of indistinguishability, which he calls <strong>ind$</strong> and <strong>ind</strong>, respectively. Here's the definitions of these to notions:
Fir... |
How to turn adversary against encryption of zeroes into adversary against random bits? |
I have one question about **ElGamal signature scheme**. For example
When Bob wants to send a message to Alice that is to be signed she makes following things:
(For example she uses Elliptic Curve Digital Signature Algorithm, but it;s not important, I have question about ElGamal signature scheme, we can make exa... |
This is not a limitation of the cryptographic functions, like SHA or PBKDF, since the zero byte isn't processed any differently.
Since the purpose of a salt is generally to travel alongside a human password, libraries that handle the password as a zero-terminated string might also handle the salt as such a string. ... |
It looks like your main question is determining why $k{_{E}}^{-1} = 2$, correct?
As mentioned in the comments to the question, this is because it is the modular multiplicative inverse.
The multiplicative inverse is a number, $x^{-1}$, such that $x*x^{-1}=1$. However, since we are in modulo 19, we want to find $x... |
I have one question about the **ECDSA signature scheme**.
When Bob wants to send a message to Alice that is to be signed she makes following things (with for example $A = (5,1)$, $d=7$, $q=19$).
1. compute hash of message $h(x) =26$
2. choose ephemeral key $k_E = 10$
3. $R = k_E · A = 10 · (5,1) = (7,11)$
... |
Why is 2 the inverse of 10? |
It looks like your main question is determining why $k{_{E}}^{-1} = 2$, correct?
As mentioned in the comments to the question, this is because it is the modular **multiplicative inverse.**
The multiplicative inverse is a number, $x^{-1}$, such that $x·x^{-1}=1$. However, since we are in modulo 19, we want to find... |
I was playing around with a problem in e-voting schemes that use additive homomorphic encryption to tally votes, namely that at the end of the day somebody (or somebodies, if the secret material has been broken up somehow) has to be trusted to decrypt the final tally.
Looking at ElGamal's additive variant, reproduce... |
According to the specification of [RFC 4764][1], contents in EAP's [third message][2] and [fourth message][3] are required to be encrypted by AES-128 in EAX mode (also called protected channel).
In RFC 4764, the length of ciphertext is as the same as the length of plaintext. However, the test vectors in [The EAX Mod... |
How is the EAX-mode used in EAP-PSK (RFC 4764)? |
I want to implement an internet-based e-voting system.
Voters shall be able to cast their vote for one out of n possible candidates. Each candidate has his own ballot-box kept by and at a trustworthy third party.
This third party is absolutely trustworthy insofar as it can be trusted to attend to his duties of superv... |
I'm using a 64-bit nonce (incremented between the streams) and a 64-bit counter (incremented within a stream) for AES in CTR mode. How many different key streams can I produce with this setup? |
How many different keystreams can I produce with AES in Counter Mode? |
Why does .NET's ECB mode implementation append a constant block to my ciphertext? |
I want to implement an internet-based e-voting system.
Voters shall be able to cast their vote for one out of n possible candidates. Each candidate has his own ballot-box kept by and at a trustworthy third party.
This third party is absolutely trustworthy insofar as it can be trusted to attend to his duties of superv... |
Yes. There has been extensive research on this question: there is even a community of cryptographers who work on building voting schemes of this sort (see [end-to-end auditable voting system](http://en.wikipedia.org/wiki/End-to-end_auditable_voting_systems)). I'll give you some advice based upon the experience from t... |
I'm developing application in Java that has to store RSA keys in software for foreseeable future (that is, at least 10 years).
The two most common standards of storing private keys are PKCS12 and JKS (Java Key Store). While PKCS12 supports many different algorithms, even the most secure ones are based on 3DES with S... |
[RFC 5958][1] and [RFC5959][2]
seems to be the latest standard for storing encrypted private keys.
It obsoletes RFC 5208, also known as PKCS#8.
My understanding is that AES is one of the many encryption algorithms supported by RFC 5958.
The [GNU Keyring File Format][3] is a another standard for a file format that... |
People have long used code systems for this purpose, instead of ciphers. With a code, you pre-establish entire messages. "John has a long mustache" might mean "sabotage the phone lines". Or the number of suits on the dry cleaning order might indicate the size of the enemy force.
Sometimes the codes are awkward,... |
> 1) the salt must be stored in clear or encrypted?
Either, the salt is only part of the protection, it helps if hackers don't know what it is, but even if they do they can't use rainbow tables. If you encrypt it then you also have to decrypt it, which means that only add defence if the hackers compromise your `[use... |
i want to ask some questions about the PBKDF2 function and generally about the password-based derivation functions.
Actually we use the derivation function together with the salt to provide resistance against the dictionary attacks, RIGHT? One example is the unix encryption scheme.
My first question : for exam... |
What you are doing sounds a lot like what the [/dev/random and /dev/urandom][1] or the [PRNGD][2] on many systems already do:
those systems take an arbitrary large sequence of numbers (from a true [hardware random number generator][3] if available, or else from environmental noise such as keystroke timing)
and feed i... |
Password based key derivation functions generate a key suitable for ciphers from a given password. It relies only on the original password being kept secret.
The purpose of the salt is simply to prevent the use of rainbow tables. A rainbow table would have to be made for each salt, and if (as is common practise), e... |
What you are doing sounds a lot like what the [/dev/random and /dev/urandom][1] or the [PRNGD][2] on many systems already do:
those systems take an arbitrary large sequence of numbers (from a true [hardware random number generator][3] if available, or else from environmental noise such as keystroke timing)
and feed i... |
Oplop is an algorithm that generates account-specific passwords from a master password and user-chosen nickname (typically username@domain). From the [website][1]:
1. Concatenate the master password with the nickname (in that order!).
2. Generate the MD5 hash of the concatenated string.
3. Convert the MD5 hash... |
Do MD5's weaknesses affect Oplop? |
Oplop is an algorithm that generates account-specific passwords from a master password and user-chosen nickname (typically username@domain). From the [website][1]:
1. Concatenate the master password with the nickname (in that order!).
2. Generate the MD5 hash of the concatenated string.
3. Convert the MD5 hash... |
`bcrypt` operates using the Blowfish block cypher. It does not use any kind of message digest function (such as MD5, SHA1, SHA-256, etc.) internally.
Of course, I think what you really wanted to ask was, "would using a traditional message digest function with some amount of stretching give similar security to `bcryp... |
As I understand it, the main advantage of bcrypt is stretching so it becomes slower to crack overtime. But, is using a "good enough" algorithm (e.g., SHA-2 family) then stretching until it's slow enough for your liking is pretty much the same as bcrypt?
Note: I understand scrypt is superior but let's assume bcrypt i... |
Is stretching hash several times basically the same as bcrypt? |
I'm working on a messaging service that lets users author messages and have them signed with an RSA key. The key is used for identity purposes only and can be revoked, so compromising the private key is annoying, but does not expose proprietary information.
Still, in order for a service to sign on behalf of a user, ... |
I'm working on a messaging service that lets users author messages and have them signed with an RSA key. The key is used for identity purposes only and can be revoked, so compromising the private key is annoying, but does not expose proprietary information.
Still, in order for a service to sign on behalf of a user, ... |
I need a GUID. Really just any number that is likely to be unique. However I prefer not to leak time and other things as a GUID may leak. What should i use as a cryptographic replacement? I was thinking maybe i could use PBKDF2 using a GUID + salt/pepper but maybe thats overkill or not what i want? |
Cryptographic GUID? |
First, realize that PBKDF2 is PKCS #5 is RFC 2898, i.e. http://www.ietf.org/rfc/rfc2898.txt
It's essentially an algorithm to securely hash a password as many times as you want, with whatever hash you want. OWASP recommends hashing the password at least 64,000 times in 2012, and doubling that every two years, per ... |
I heard multiple times not to reuse the same IV and IV should be random but doesn't need to be secret. I also heard if the IV is something like sequential numbers or something predictable I should hash(salt+pepper) it. Why on earth should i be doing that if they don't need to be a secret?
In this specific case i am ... |
Why can't the IV be predictable when its said it doesn't need to be a secret? |
The requirements for an IV depend on which encryption algorithm you are using (AES is not an encryption algorithm by itself, since it can only act on 16-byte strings, but it can be used as a building block in a variety of different encryption schemes).
Roughly speaking, the role of the IV is to insert some "new" ran... |
No, it doesn't work that way. You have to introduce memory in the equation. The whole point of bcrypt and scrypt is that they use a variable amount of memory (that cannot be optimized out) to calculate the final "hash". Often this takes the form of large lookup tables which cannot be inlined because they are accessed p... |
The requirements for an IV depend on which encryption algorithm you are using (AES is not an encryption algorithm by itself, since it can only act on 16-byte strings, but it can be used as a building block in a variety of different encryption schemes), specifically on the [mode of operation][1].
Roughly speaking, th... |
Recently I found out (P)CBC the IV may be passed in cleartext but never must be predictable. However for this part of my app I rather have the IV be predictable and unique rather than random.
What options do I have as a cipher mode? How do I choose between them? Which is the main difference between OFB and CFB? |
Choosing a cipher which allows predictable IV? |
By George, you're on to something.
To answer the question you asked, I don't know of anyone actually attempting to recover a password this way, or it even being discussed. However, it does appear to be feasible, given enough encrypted streams.
How many are enough? Well, I've started running a few simulations; p... |
By George, you're on to something.
To answer the question you asked, I don't know of anyone actually attempting to recover a password this way, or it even being discussed. However, it does appear to be feasible, given enough encrypted streams.
How many are enough? Well, I've started running a few simulations; p... |
Is it the same as the bits of the key (So a 2048 bit system will yield a 2048 bit signature)? At _most_ as the key? Or something else entirely? |
What is the length of an RSA signature? |
[PKCS#1][1], "the" RSA standard, describes how a signature should be encoded, and it is a sequence of bytes with big-endian unsigned encoding, always of the size of the modulus. This means that for a 2048-bit modulus, all signatures have length exactly 256 bytes, never more, never less.
PKCS#1 is the most widely use... |
I've been reading up on the Secure Remote Pasword protocol (i.e. SRP: http://srp.stanford.edu/design.html). There are a couple different versions of the protocol (the original published version being designated SRP-3, with two subsequent enhancements 6 and 6a).
There was a very limited attack on version 3, where the... |
I [read][1] that Fully Homomorphic Encryption schemes are special case of Secure MPC in page no 3. Especially , generalization of two party computation problems stated by Yao
But is there any additional literature showing the connections of the same ?
[1]: http://static.usenix.org/events/hotsec10/tech/full_... |
homomorphic encryption special case of multi party computation? |
Recently I found out that in the modes CBC and PCBC the IV may be passed in cleartext but never must be predictable. However for this part of my app I rather have the IV be predictable and unique (i.e. generated from other data known to the "receiver" and also the adversary, and not stored/transmitted with the cipherte... |
Which block cipher modes of operation allow a predictable IV? |
I've been reading up on the [Secure Remote Pasword protocol][1] (SRP). There are a couple different versions of the protocol (the original published version being designated SRP-3, with two subsequent enhancements 6 and 6a).
There was a very limited attack on version 3, where the attacker could submit two password g... |
Why does SRP-6a use k = H(N, g) instead of the k = 3 in SRP-6? |
While writing [this answer](http://crypto.stackexchange.com/a/3514), I noted that [NIST SP 800-38A](http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf) says that (emphasis mine):
> "**For the CBC and CFB modes, the IVs must be unpredictable.** In particular, for any given plaintext, it must not be poss... |
Is a using a predictable IV with CFB mode safe? |
Is a using a predictable IV with CFB mode safe or not? |
Is using a predictable IV with CFB mode safe or not? |
I found a little more info on Google, so let me provide a partial answer to my own question. In particular, I found a post by David Wagner to sci.crypt in 2004, titled ["IND-CPA for CFB mode"](http://groups.google.com/groups?selm=cjb4es%24fdl%241%40agate.berkeley.edu), which in turn led me to a paper titled ["Practica... |
Is the MD5 prefixing attack still valuable to an attacker if he doesn't know the postfix of the string?
For instance, what if the following sanity check was being used:
if attacker_controlled_sanity_code == md5(attacker_controlled + cryptographic_nonce)
Clearly not an RFC compliant HMAC. Despite the f... |
The terms AES CCM and AES CCMP are equivalent ?
Or is there any technical differences between AES CCM and AES CCMP ?
Thanks
|
Consider a communication channel that needs to be secure (Encryption can not use full "volume" encryption, since future messages are not known). Would it be better to
* only transmit encrypted messages and remain silent the rest of the time (therefore letting eavesdroppers know _when_ a message is passed),
* or sen... |
Is a continuous stream of encrypted data embedded in garbage more or less secure than only encrypting the data? |
It depends on what your requirements are. In general, it is accepted that an observer knows when meaningful data is exchanged - even if he can't read it - because, well, we simply don't care. But in some cases this may be unacceptable, such as in p2p protocols where anonymity is very desirable and a fuzzy network can a... |
Are the terms AES CCM and AES CCMP are equivalent, or is there any technical differences between the two?
|
Do a certificate contain the complete chain of all certificates up to the trusted root certificate ?
Or the program that verifies certificate has to fetch each parent certificate individually up in the chain to reach a trusted root certificate?
|
Does a certificate contain the complete chain of all certificates up to the trusted root certificate, or does the program that verifies certificates have to fetch each parent certificate individually in the chain to reach a trusted root certificate?
|
Is the MD5 prefixing attack still valuable to an attacker if he doesn't know the postfix of the string?
For instance, what if the following sanity check was being used:
if attacker_controlled_sanity_code == md5(attacker_controlled + secret_key)
Clearly not an RFC compliant HMAC. Despite the fact that ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.