instruction
stringlengths
15
30k
**Simple version:** Create software that takes a database of the dictionary, alphabet, and phrases. Randomly generate a database of random strings of letters/numbers/symbols of varying length. Randomly assign different strings to different words/letters/phrases. Frequency analysis should already be hard because ...
You are right to be confused, because you could just as well have asked *"How can I encrypt a file using a CPU that supports xor, shifts and rotates?"* The answer is that of course you can, but there is obviously a lot more to it, if you are going to do it right. AES is just a standard block cipher primitive. The on...
I was wondering if changing the cipher mode to AES-XTS in [EncFS](http://www.arg0.net/encfs) would be a sound idea. EncFS uses AES in CBC mode until the last 1KB block, and CFB mode for the last block if `len(block) < 1KB`. This ensures that `len(plaintext) == len(ciphertext)`. The design seems somewhat convoluted,...
I was thinking of a potential new way to increase someone's account security. The idea was allowing the user to choose one of the hash formulas available in the software (example: MD5, SHA512 and Whirlpool) decreasing the chances of any intruder to find out the hashing system used in case passwords are, for some rea...
This doesn't sound like a good idea. As CodeInChaos already pointed out, choose one good password hashing scheme like scrypt or bcrypt and go with that The reason why what you proposed isn't so great is that you'll give the user the choice between a few good password hashing options and the work of an attacker is at...
It has recently emerged that a paper that was scheduled to appear at Usenix Security 2013, titled *"Dismantling Megamos Crypto: Wirelessly Lockpicking a Vehicle Immobiliser"*, has been **censored** according to a [newspaper article in the "Guardian"](http://www.guardian.co.uk/technology/2013/jul/26/scientist-banned-rev...
I was thinking of a potential new way to increase someone's account security. The idea was allowing the user to choose one of the hash formulas available in the software (example: *"MD5"*, *"SHA512"* and *"Whirlpool"*), decreasing the chances of any intruder to find out the hashing system used in case passwords are ...
I have a time authority and I want to securely set a client's time to this authority's time/date within a precision of $\delta$ seconds. The authority's public key is known to the client. This was my idea: 1. A client sends a request with a 128-bit randomly generated nonce to the authority, and starts a timer. 2. T...
Any problems with this secure time synchronization scheme?
I have a time authority and I want to securely set a client's time to this authority's time/date within a precision of $\delta$ seconds. The authority's public key is known to the client. This was my idea: 1. A client sends a request with a 128-bit randomly generated nonce to the authority, and starts a timer. 2. T...
I have a time authority and I want to securely set a client's time to this authority's time/date within a precision of $\delta$ seconds. The authority's public key is known to the client. This was my idea: 1. A client sends a request with a 128-bit randomly generated nonce to the authority, and starts a timer. 2. T...
I've been reading about SHA. I read that SHA-1 is insecure as it uses the Merkle Damgard Construction and the Merkle Damgard Construction is susceptible to a variety of attacks (http://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction#Security_characteristics). However, I have not been able to come up with...
Why is Merkle-Damgard Construction Insecure?
From the [court decision][1], we find out that the researchers didn't in fact reverse engineer the key transponders themselves, but a piece of software called "Tango Programmer" which is a third party tool (software and hardware) used to make transponders. [Tango Programmer][2] is readily available, but it appears t...
From the [court decision][1], we find out that the researchers didn't in fact reverse engineer the key transponders themselves, but a piece of software called "Tango Programmer" which is a third party tool (software and hardware) used to make transponders. [Tango Programmer][2] is readily available, but it appears t...
From the [court decision][1], we find out that the researchers didn't in fact reverse engineer the key transponders themselves, but a piece of software called "Tango Programmer" which is a third party tool (software and hardware) used to make transponders. [Tango Programmer][2] is readily available, but it appears t...
As without using modes we can also encrypt and decrypt data then what is the need of using modes in DES?
why DES encryption uses different modes like ECB,OFB?
I've been reading about SHA-1. I read that SHA-1 is insecure as it uses the Merkle-Damgård construction and the Merkle-Damgård construction is [susceptible to a variety of attacks](http://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction#Security_characteristics). However, I have not been able to come up w...
Why is Merkle-Damgård construction insecure?
I've been reading about SHA-1. I read that SHA-1 is insecure as it uses the Merkle-Damgård construction and the Merkle-Damgård construction is — [according to Wikipedia](http://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction#Security_characteristics) — susceptible to a variety of attacks. However, I have...
If an attacker were able to get a hold of 2 encrypted messages that were both encrypted in a one time pad with a password that were each similar but had one change in the first character, could it still be cracked? Let's say my first set of data was encrypted with "1password" and my second set of data was encrypted wi...
Can OTP still be broken if there are several messages being sent with only a slight variation in a password?
What do you mean 'a one time pad with a password'? One time pads don't take passwords, they take samples of truly random data as long as the message. If what you're doing is taking the password, repeating it N times, and using that as if it were a random one-time pad, well, that can usually be broken even if you do...
As a new programmer interested in coding an application of my own to encrypt sensitive files of mine (ie. lists of passwords, bank accounts, Credit Card numbers etc. etc.) I was wondering what would be the easiest encryption algorithms to learn from a purely theoretical point of view?
I am encrypting a string in a format like this: Byte 1: 1 (this byte is CONSTANT and KNOWN) Byte 2-18: a random string of characters that is never the same. Byte 18-34: unknown number that is sequentially incremented each time (it's a primary key from a mySQL AUTOINCREMENT column) ...
Could using sequential plaintext uncover AES key?
Alice has a bank account number, but has forgotten which bank it is for. There are 4 banks, run by Bob, Carlos, David, and Eve. She could find out by going to all of the banks and asking if they have the account number. However, if Eve learns Alice's account number, then Eve will go to Alice's actual bank and steal ...
> Could the attacker figure out the AES key if the IV used to encrypt all the strings is the same? No; the AES key is secure against such an attack. > Could the attacker figure out the AES key if the IV used to encrypt all the strings is NOT the same (one IV per string), but known? No, the AES key is secure a...
> Could the attacker figure out the AES key if the IV used to encrypt all the strings is the same? No; the AES key is secure against such an attack. > Could the attacker figure out the AES key if the IV used to encrypt all the strings is NOT the same (one IV per string), but known? No, the AES key is secure a...
How about a [private set intersection protocol][1]? The banks input is a set of all of their account numbers, the user's input is their account number (a single member set). The output could be given to the user, or the bank, or both, depending on your needs. You would need a way to protect against guessing accou...
> Could the attacker figure out the AES key if the IV used to encrypt all the strings is the same? No; the AES key is secure against such an attack. > Could the attacker figure out the AES key if the IV used to encrypt all the strings is NOT the same (one IV per string), but known? No, the AES key is secure a...
**Private Set Intersection** How about a [private set intersection protocol][1]? The banks input is a set of all of their account numbers, the user's input is their account number (a single member set). The output could be given to the user, or the bank, or both, depending on your needs. You would need a way t...
Is this method of using CBC deterministically secure?
Is this method of deterministically using CBC secure?
Would a scheme like the following work to allow authentication of a sender: A nonce is appended to data, and the result is encrypted. The encrypted pack is sent to the other party. The sender then contacts the receiver through an authenticated channel (or one that is sufficiently good for the current purposes) and p...
Can an encrypted nonce be used for authentication?
This note (http://maths-people.anu.edu.au/~brent/pd/primality4.pdf) states that AKS is not practical. However, it is known that AKS runs in polynomial-time, and I cannot understand where the slowness of AKS algorithm comes from? Brent, on the above link, justifies this to the high probability of hardware errors during ...
why AKS is so slow in practice?
I am encrypting a string in a format like this: Byte 1: 1 (this byte is CONSTANT and KNOWN) Byte 2-18: a random string of characters that is never the same. Byte 18-34: unknown number that is sequentially incremented each time (it's a primary key from a mySQL AUTOINCREMENT column) ...
I was wondering if changing the cipher mode to AES-XTS in [EncFS](http://www.arg0.net/encfs) would be a sound idea. EncFS uses AES in CBC mode until the last 1KB block, and CFB mode for the last block if `len(block) < 1KB`. This ensures that `len(plaintext) == len(ciphertext)`. The design seems somewhat convoluted,...
We are currently developing a little AES implementation in a crypto-course at university. As far as I know, AES uses a 128 bit block length, so all data that will be encrypted gets split up into blocks of 128 bits (16 bytes) into a 2d-array (or 1d in implementation) with 4 &times; 4 fields. I was wondering and di...
AES plaintext is smaller than 128 bits - how to expand?
Here is the issue that Brent is worried about on the slides (I'm not saying I agree; I just saying what the issue is): Suppose we ran our algorithm, and it gave a result "it's prime"; how can we be certain that the algorithm didn't run into an internal hardware error? This may sound like a trivial point, however th...
Here is the issue about hardware errors that Brent is worried about on the slides (I'm not saying I agree; I just saying what the issue is): Suppose we ran our algorithm, and it gave a result "it's prime"; how can we be certain that the algorithm didn't run into an internal hardware error? This may sound like a tri...
Here is the issue about hardware errors that Brent is worried about on the slides (I'm not saying I agree; I just saying what the issue is): Suppose we ran our algorithm, and it gave a result "it's prime"; how can we be certain that the algorithm didn't gave us the wrong answer because of an internal hardware error ...
I'm using aes-256-gcm for authenticated encryption. In order to decrypt, the ruby library gives an `auth_tag` (in addition to the key and iv). This, according to the [ruby docs](http://www.ruby-doc.org/stdlib-2.0/libdoc/openssl/rdoc/OpenSSL/Cipher.html#label-Authenticated+Encryption+and+Associated+Data+%28AEAD%29), is ...
In [a comment](http://crypto.stackexchange.com/questions/9641/alices-forgetful-banking/9654#comment18656_9654) to an answer I wrote to another question, CodesInChaos wrote that: > "Problem with SRP is that an attacker who impersonates a server learns the password hash, enabling offline search." and [further](http...
Does impersonating an SRP server give you enough information for an off-line dictionary attack?
I'm using AES-256-GCM for authenticated encryption. In order to decrypt, the [ruby OpenSSL library](http://www.ruby-doc.org/stdlib-2.0/libdoc/openssl/rdoc/OpenSSL.html) requires an `auth_tag` parameter (in addition to the key and iv). This, according to the [ruby docs](http://www.ruby-doc.org/stdlib-2.0/libdoc/openssl/...
How to supply the GCM authentication tag to the OpenSSL command line tools?
I'm trying to figure out a way to do public key encryption on a very large piece of data. For this, I of course want one side to do the encrypting but is unable to decrypt the data, and the other side to be able to decrypt data. But for RSA encryption, there's a limit to the reasonable size-performance on how big...
What are the security effects of reusing a public RSA key to encrypt large data by blocks?
Suppose the server *did not* include $v$ in the computation of $B$. In such case the following events have happened: 1. The server has sent a salt value $s$ to the client. We might assume it is authentic (because it is easy for the fake server to get it from the real server). The client re-calculates its long term...
Suppose the server *did not* include $v$ in the computation of $B$. In such case the following events have happened: 1. The server has sent a salt value $s$ to the client. We might assume it is authentic (because it is easy for the fake server to get it from the real server). The client re-calculates its long term...
The Koblitz elliptic curves specified in the SEC2 document https://docs.google.com/viewer?url=http%3A%2F%2Fwww.secg.org%2Fcollateral%2Fsec2_final.pdf all have the nice feature that the parameters are highly non-arbitrary; the modulus is simply a few powers of two put together, and the a and b parameters are 0 and 7. Th...
How Were secp*k1 elliptic curve generators chosen?
Suppose the server *did not* include $v$ in the computation of $B$. In such case the following events have happened: 1. The server has sent a salt value $s$ to the client. We might assume it is authentic (because it is easy for the fake server to get it from the real server). The client re-calculates its long term...
Depending on what you actually want to do, it might be possible to speed this up using a batch inversion, instead of inverting each denominator individually. 1. Use some form of extended coordinates 2. Compute a few hundred new points in extended coordinates, with known relation to the original point. 3. Multiply ...
Definition - E: AES encryption - D: AES decryption - x: plain text - y: encrypted text - k: key In original AES cipher, - encryption: y = E(x, k) - decryption: x = D(y, k) Then I define the "reverse AES cipher" as below. - encryption: y = D(x, k) - decryption: x = E(y, k) Is "reverse...
Can AES decryption be used as encryption?
If DES decrypt in reverse ordere of encryption then how $S-Box$ will convert the 4-bit into 6-bits ? please explain it with example.
how DES Decrypt ?Is It is in same way as encryption or reverse?
I'm building an embedded device that I plan on distributing. Periodically the device will ping my server to check for updates and commands. I'd like the device to verify that any messages(JSON strings parsed by client written in Go) and updates are actually from me. My plan is to use use Go's crypto/ecdsa library to...
I'm building an embedded device that I plan on distributing. Periodically the device will ping my server to check for updates and commands. I'd like the device to verify that any messages(JSON strings parsed by client written in Go) and updates are actually from me. My plan is to use use Go's crypto/ecdsa library to...
I'm building an embedded device that I plan on distributing. Periodically the device will poll my server to check for updates and commands. I'd like the device to verify that any messages(JSON strings parsed by a client written in Go) and updates are actually from me. My plan is to use use Go's crypto/ecdsa library ...
Suppose the server *did not* include $v$ in the computation of $B$. In such case the following events have happened: 1. The server has sent a salt value $s$ to the client. We might assume it is authentic (because it is easy for the fake server to get it from the real server). The client re-calculates its long term...
Since you asked in general "Are there any other obvious flaws/issues I'm missing", I would recommend that you would take a critical look at the whole update process flow. I would not consider the quality of the PRNG at your server as an obvious weak point, as long as it is reasonably strong, since on servers you have q...
If DES decryption is the same as encryption done in reverse order, then how can the reversed S-Box convert 4 bits into 6 bits?
How does DES decryption work? Is it the same as encryption or the reverse?
Actually, that wikipedia article you mention in your question already answers your question: > It is moderately common for companies and sometimes even standards bodies as in the case of the CSS encryption on DVDs – to keep the inner workings of a system secret. Some argue this "security by obscurity" makes the pro...
why DES uses exactly 16 rounds?
How does certificate-based encryption solve key revocation problem? For example, if a user accidentally reveals its secret key or an attacker compromises it, the user may request revocation of its certificate. Alternatively, the user's company may request revocation if the user leaves the company or changes position...
How does certificate-based encryption solve key revocation problem?
While reading the Wiki page on RC4 I noticed that the key size must be in the range of 40–2,048 bits. So should I understand like this, that I can have a key that has length of, lets say 333 bits? (**any** decimal number between 40-2048?) How about inputs length? Imagine that I can ask a user to give me an input len...
I am encrypting files for storage in an untrusted location, using a custom Java program to do that. There is *only one user*, but there are many files. I am using AES in CBC mode with PKCS5 padding, and the key is created from a single password using PBKDF2. **Question:** Would it increase security if I used a diff...
Are there any cryptographic hash functions for which there is a known pre-image attack, or a known second pre-image attack, but not both? The attack doesn't have to be practical - just anything that beats the security claim of the hash function. Intuitively, 2nd pre-image attacks would be easier to find than pre-...
Pre-image resistant but not 2nd pre-image resistant?
I am encrypting files for storage in an untrusted location, using a custom Java program to do that. There is *only one user*, but there are many files. I am using AES in CBC mode with PKCS5 padding, and the key is created from a single passphrase using PBKDF2. **Question:** Would it increase security if I used a di...
I am studying Fractal Merkle Tree Traversal algorithm in [this book][1]. In the [pag. 48] I don't understand this paragraph: > We may determine the number of pebbles returned at these times by observing that a leaf is returned every single round, a pebble at height > $ih + 1$ every two rounds, one at heigh...
How does certificate-based encryption solve key revocation problem? For example, if a user accidentally reveals its secret key or an attacker compromises it, the user may request revocation of its certificate. Alternatively, the user's company may request revocation if the user leaves the company or changes position...
I am studying Fractal Merkle Tree Traversal algorithm in [this book][1]. In the [pag. 48] I don't understand this paragraph: > We may determine the number of pebbles returned at these times by observing that a leaf is returned every single round, a pebble at height > $ih + 1$ every two rounds, one at heigh...
I was reading [this question]( http://crypto.stackexchange.com/questions/3645/how-is-ciphercloud-doing-homomorphic-encryption) and was wondering: Is there a technically feasible way for companies like CipherCloud to use Homomorphic Encryption while preserving full functionality in a third party SaaS app like -say- S...
Do companies like CipherCloud really have the option to use homomorphic encryption?
I have two systems which need to encrypt their communication by AES-128. The key for the AES encryption should be exchanged with the Diffie-Hellman (DH) algorithm. Now, I've read about DH and got a lot of question marks over my head. These are my questions: 1. Typically with AES-128, you need a password and a key...
[Reports are surfacing][1] that the Java [SecureRandom][2] class has issues and isn't totally secure. Can someone help me understand what the problem is (namely "colliding R values") and how it's resolved? [1]: http://www.pcworld.com/article/2046440/bitcoin-wallets-on-android-at-risk-of-theft-developers-say.h...
What are "colliding R values" in the Java SecureRandom class?
[Reports are surfacing][1] that Android's Java [SecureRandom][2] class has issues and isn't totally secure. A specific example of how this issue translates to applications is bitcoin, where reports are stating that the bitcoin wallet is at risk of theft. With bitcoin specifically, the reports say that "colliding R v...
Most of the libraries I've seen allow you to add encrypted numbers. Is it possible to subtract and multiply them?
Is it possible to subtract/multiply numbers using homomorphic encryption?
I am studying Fractal Merkle Tree Traversal algorithm in [this book][1]. In the [pag. 48] I don't understand this paragraph: > We may determine the number of pebbles returned at these times by observing that a leaf is returned every single round, a pebble at height > $ih + 1$ every two rounds, one at heigh...
Is there any problem with using social media (i.e. Facebook) as a directory of public keys? For example, couldn't Alice put a note containing (g^a mod p, g, p) on her Facebook page so she could recieve email attachements which have been encrypted with the common secret value? That is, Bob would encrypt his message wi...
[Reports are surfacing][1] that Android's Java [SecureRandom][2] class has issues and isn't totally secure. A specific example of how this issue translates to applications is bitcoin, where reports are stating that the bitcoin wallet is at risk of theft. With bitcoin specifically, the reports say that "colliding R v...
This is how the Pedersen commitment seems to work: Let $p$ and $q$ be large primes such that $q|p-1$, let $g$ be a generator of the order-$q$ subgroup of $Z_p^{\star}$. Let $a$ be a random secret from $Z_q$, and $h=g^a$ $mod$ $p$. The values $p$, $q$, $g$ and $h$ are public, while $a$ is secret. To **commit** ...
Why is the Pedersen commitment computationally binding?
Is there any problem with using social media (i.e. Facebook) as a directory of public keys? For example, couldn't Alice put a note containing `(g^a mod p, g, p)` on her Facebook page so she could receive email attachments which have been encrypted with the common secret value? That is, Bob would encrypt his messa...
Is there any problem with using social media (i.e. Facebook) as a directory of public keys? For example, couldn't Alice put a note containing $(g^a \bmod p, g, p)$ on her Facebook page so she could receive email attachments which have been encrypted with the common secret value? That is, Bob would encrypt his mes...
I am studying Fractal Merkle Tree Traversal algorithm in [this book][1]. In the [pag. 54] I don't understand this paragraph: > We may determine the number of pebbles returned at these times by observing that a leaf is returned every single round, a pebble at height > $ih + 1$ every two rounds, one at heigh...
Have you read [Wikipedia: homomorphic encryption][1] and [Bruce Schneier: Homomorphic Encryption Breakthrough][2]? In summary: > Is it possible to subtract numbers using homomorphic encryption? Is it > possible to multiply numbers using homomorphic encryption? Yes, there are many known partially homomorphi...
I was reading http://crypto.stackexchange.com/questions/3645/how-is-ciphercloud-doing-homomorphic-encryption and was wondering: Is there a technically feasible way for companies like CipherCloud to use homomorphic encryption (HE) while preserving full functionality in a third party SaaS app (e.g. Salesforce)? I b...