instruction
stringlengths
15
30k
Recently, a user on Gaming.SE asked [a question](http://gaming.stackexchange.com/q/44282/5398) about whether the user password in the video game [Uplink](http://www.introversion.co.uk/uplink/) could be modified after being initially set. The game does not contain an option to change the password, and the password is r...
How can I break REDSHIRT / REDSHIRT2 encryption?
Ever since the SHA-3 competition, I've been wondering if it is possible to create a hash algorithm that is easier to parallelize. The current algorithms all seem to require building a tree of hashes. This has however rather serious drawbacks: 1. as they requires a tree with certain parameters (such as the size of no...
First, lets get some thing clear over here. The analysis of Grover's algorithm is asymptotic, so it is fairly unfair to perform something as concrete as the setting you have mentioned. Grover's algorithm gives you an asymptotic upper bound of $O(\sqrt{N})$ for searching in an unsorted array of size $N$ so I have tro...
In c#, there is a namespace called `System.Security.Cryptography` and there are many classes in this namespace, which help developers encrypt and decrypt data. However, always they take `byte[]` array and they return `byte[]` array. So, as a developer, you have to always write a library to get the clear-text, turn it i...
Why programming languages don't provide simple encryption methods?
It's not nearly as simple as you imagine. When you encrypt a string, what character set is it in? What characters are permissible in the output? There are too many unusual combinations of code requirements and security requirements for a "one size fits all" to make sense. But if you think one size does fit all, sit ...
I'd like to encrypt files deterministically, such that any users encrypting the same plaintext will use the same key and end up with the same ciphertext. The ciphertext should be private as long as the plaintext is. I plan to use AES-128-CTR with an IV of 0 and the SHA-256 of the plaintext as the key. IV values a...
Does AES-CTR require an IV for any purpose other than distinguishing identical inputs?
I'd like to encrypt files deterministically, such that any users encrypting the same plaintext will use the same key and end up with the same ciphertext. The ciphertext should be private as long as the plaintext is. I plan to use AES-128-CTR with an IV of 0 and the SHA-256 of the plaintext as the key. IV values a...
I'd like to encrypt files deterministically, such that any users encrypting the same plaintext will use the same key and end up with the same ciphertext. The ciphertext should be private as long as the plaintext is. I plan to use AES-128-CTR with an IV of 0 and the SHA-256 of the plaintext as the key. IV values a...
Well, no, in your case, a constant IV is not a problem. With counter mode, the rule is that you cannot reuse the same IV with the same key. However, it is perfectly fine to use the same IV with different keys, and that's what you're doing. One minor correction to what you have (that doesn't directly relate to your...
Well, no, in your case, a constant IV is not a problem. With counter mode, the rule is that you cannot reuse the same IV with the same key. However, it is perfectly fine to use the same IV with different keys, and that's what you're doing. One minor correction to what you have (that doesn't directly relate to your...
The reason is that different libraries offer different functionality. There are libraries that offer relatively easy to use encryption methods. How ever you may want to use a library that offers a more complex method. The language allows for a common syntax. The methods you are mentioned are part of the libraries. ...
I am creating a service that will return an set of objects, which will be used by multiple systems. At the end of the process, one (or more) of the objects will be sent back to our system for association. My service basically checks our system and gets valid solutions. I want to create a hash to validate that the ...
I originally posted this question in the mathematics section, you can see it [here][1]. Let $p$ and $q$ be large primes, $n=pq$ and $e : 0<e<\phi(n), \space gcd(e, \phi(n))=1$ the public encyption exponent, $d : ed \equiv 1 \space (mod \space \phi(n)) $ the private decription exponent, and $m \in \mathbb{Z_n}$ the p...
One of the biggest problems you'll have is to ascertain that $m^{e^k} = m$ for some $k$. You need to have a way of knowing that particular value is genuine. Given the typical use-case of RSA applies padding and is used for small data sizes for things such as keys to symmetric algorithms, it isn't always likely that thi...
One of the biggest problems you'll have is to ascertain that $m^{e^k} = m$ for some $k$. You need to have a way of knowing that particular value is genuine. Given the typical use-case of RSA applies padding and is used for small data sizes for things such as keys to symmetric algorithms, it isn't always likely that thi...
I'm revising for a cryptography exam at the moment and I'm having some problems with a question. The question looks for the key length of a cipher given that the word "earthquake" appears in the plaintext. Ciphertext: aaatr ksams itahb netrs weurs rheti aadne ttrht eakgt snqid s I was wondering how I use the...
I'm not sure what level of explanation you are looking for, but from the **very basics**, subgroups work like this. Consider concretely the example of working $\mod{p}$ where $p=11$. Next we have to find a generator $g$. Initially, any number $\{0,\ldots,n-1\}$ (or $\mathbb{Z}_p$ for short) is a candidate. Below ...
I'm not sure what level of explanation you are looking for, but from the **very basics**, subgroups work like this. Consider concretely the example of working $\mod{p}$ where $p=11$. Next we have to find a generator $g$. Initially, any number $\{0,\ldots,n-1\}$ (or $\mathbb{Z}_p$ for short) is a candidate. Below ...
I'm revising for a cryptography exam at the moment and I'm having some problems with a question. The question looks for the key length of a cipher given that the word "earthquake" appears in the plaintext. Ciphertext: _aaatr ksams itahb netrs weurs rheti aadne ttrht eakgt snqid s_ I was wondering how I use t...
In the comments of the question "[Why programming languages don't provide simple encryption methods?][1]" the following statement was made: > A well thought out, tested and understood standard that has undergone > extensive review by the crypto community has a much better [chance] of > avoiding compromise than a s...
Is it possible to create an easy to use encryption decryption method that will never be be comprimised?
Both the Vigenère and autokey ciphers are classified as polyalphabetic [substitution ciphers](http://en.wikipedia.org/wiki/Substitution_cipher), so the cipher in your exam is not likely to be either of those. Rather, the phrasing of the question suggests that it belongs to the other branch of classical ciphers, [trans...
Both the Vigenère and autokey ciphers are classified as polyalphabetic [substitution ciphers](http://en.wikipedia.org/wiki/Substitution_cipher), so the cipher in your exam is not likely to be either of those. Rather, the phrasing of the question suggests that it belongs to the other branch of classical ciphers, [trans...
Is it possible to create an easy to use encryption/decryption method that will never be comprimised?
> Is such a scheme possible? Theoretically "Yes", but only under a certain, single condition... It is a common misconception that every encryption method can be broken. In connection with his WWII work at Bell Labs, Claude Shannon proved that the one-time pad cipher is unbreakable, provided the key material is ...
According to Wikipedia: > Related-key attacks can break AES-192 and AES-256 with complexities $2^{176}$ and $2^{99.5}$, respectively. What are the requirements for these attacks (i.e how many related keys, what should the relationship between the keys be)? Optionally, how do the attacks work in summary?
I wish to simulate an implementation of a DES Cracker using verilog. But every paper I read give only abstract hints but no concrete steps or how really to go about it. How is it usually done? For example for DES encryption there exists a sequence of steps with ordered connection of known blocks.
In the comments of the question "[Why programming languages don't provide simple encryption methods?][1]" the following statement was made: > A well thought out, tested and understood standard that has undergone > extensive review by the crypto community has a much better [chance] of > avoiding compromise than a s...
**Disclaimer:** *You should probably talk to your advisor about this rather than the internet since your advisor will be responsable for supporting your project and judging it's results.* The [SHA3 cryptographic hash function contest][1] is still ongoing. A fun project would be to choose the hash function of your ch...
**Disclaimer:** *You should probably talk to your advisor about this rather than the internet since your advisor will be responsable for supporting your project and judging it's results.* **Disclaimer2:** *My answer is probably more appropriate for a Computer Science or Mathematics Major. PulpSpy's [answer][1] is mo...
Suppose someone had generated a 2.048-Bit RSA GPG/PGP key pair and published the public key on the usual key servers. Then he withdraws this key and generates a new one in 4.096-Bit RSA using the same passphrase again. Theoretically, can the passphrase be cracked by mathematically comparing the two public keys or do...
two public keys with same passphrase insecure?
If I have a 1024-bit number, and someone is telling me that it is in fact a valid RSA public key, is there any way I can quickly validate that it is indeed so (without cracking RSA)? (I suppose I am asking if it's possible to quickly tell if a number only has 2 prime factors)
Is it possible to validate a Public Key in RSA?
Suppose we have two people: Smith and Jones. Smith public key is `e=9, n=179` and Jones public key is `e=13, n=179`. Bob sends to them a message $M$. The encrypted message $C_s$ to Smith is 32. The encrypted message $C_j$ to Jones is 127 I tried to resolve this problem with no luck. First I put both of ...
Suppose we have two people: Smith and Jones. Smith public key is `e=9, n=179` and Jones public key is `e=13, n=179`. Bob sends to them a message $M$. The encrypted message $C_s$ to Smith is 32. The encrypted message $C_j$ to Jones is 127 I tried to resolve this problem with no luck. First I put both of ...
There are two approaches to such a validation: - **Test**: you can look at the number and decide without involving the person who gave it to you. - **Proof**: The person who generated the number can also give you additional information that will convince you it is a correct RSA number. There are no tests for R...
[Random.org][1] provides true random numbers through an unsecured web service. Since these numbers would be transmitted in plaintext could they still be considered useful as [true random numbers][2] while maintaining security in a cryptographic solution? At first I was thinking if a large pool of them was obtained t...
Would it be secure to use random numbers from random.org in a cryptographic solution?
[Random.org][1] provides true random numbers through an unsecured web service. Since these numbers would be transmitted in plaintext could they still be considered useful as [true random numbers][2] while maintaining security in a cryptographic solution? At first I was thinking if a large pool of them was obtained t...
Is ISAAC considered secure as a cryptographic random number generator?
Suppose someone had generated a 2.048-Bit RSA GPG/PGP key pair and published the public key on the usual key servers. Then he withdraws this key and generates a new one in 4.096-Bit RSA using the same passphrase again. Theoretically, can the passphrase be cracked by mathematically comparing the two public keys or do...
two public keys with same passphrase insecure? | can two hashes be compared?
I've seen some libraries that offer simplified cryptography methods, but as that was a long time ago (like 15-20 years) because they only handled ASCII strings, with your choice of Base64 or Hex output. But as [David pointed out][1] things are much more complicated. Most systems handle Unicode and different character e...
The more I think about it, the less I would be willing to use Random.org for any sort of cryptographic application. My reasons are listed below. 1. [See Q2.2][1], the groups listed are not cryptographic groups and potentially (or probably) don't have cryptographers on their evaluation teams 2. [They specifically ...
Seems most documentation I have read suggests the salt should prefix the value to be hashed. Is this just for consistency, or is the salt more effective when prefixed?
Is a salt better to prefix or suffix the plain text value?
Does the position of the salt improve its effectiveness when hashing?
> Is such a scheme possible? Theoretically "Yes", but only under a certain, single condition... It is a common misconception that every encryption method can be broken. In connection with his WWII work at Bell Labs, Claude Shannon proved that the one-time pad cipher is unbreakable, provided the key material is ...
> Is such a scheme possible? Theoretically "Yes", but only under a certain, single condition... It is a common misconception that every encryption method can be broken. In connection with his WWII work at Bell Labs, Claude Shannon proved that the one-time pad cipher is unbreakable, provided the key material is ...
> Is such a scheme possible? Theoretically "Yes", but only under a certain, single condition... It is a common misconception that every encryption method can be broken. In connection with his WWII work at Bell Labs, Claude Shannon proved that the one-time pad cipher is unbreakable, provided the key material is ...
Two untrusted party want to exchange data: how to insure each one gets the data it needs?
Two untrusted party want to exchange data: how to ensure each one gets the data it needs?
For reasonable security, EC private keys are typically 256-bits. Shorter EC private keys are not sufficiently secure. However, shorter symmetric keys (128-bits, for example) are comparably secure. I have a case where I need to regenerate an EC private key (that can be constructed by a special method) with as little ...
In real life, exchanging at the same time does not solve this problem. - Punch the guy, take the cash and run. - Bring a gun - Bring a bunch of friends to overpower him - etc... The correct way to solve this problem is to use an [escrow][1]. The same goes for doing this with bits, you need to have a tru...
I am trying to come up with what could maybe be a novel algorithm for an application I am writing. Client A has a file fA. Client B has file fB. Each party is untrustworthy and will try to rip off the other party. Client A wants the fB and client B wants fA. How can I make an algorithm were it is not possible for th...
Two untrusted party want to exchange data: how to insure each one gets the data it needs?
For reasonable security, EC private keys are typically 256-bits. Shorter EC private keys are not sufficiently secure. However, shorter symmetric keys (128-bits, for example) are comparably secure. I have a case where I need to regenerate an EC private key (that can be constructed by a special method) with as little ...
Say I have a bunch of data encrypted with a secure block cipher (such as AES). An attacker has unlimited access to this encrypted data. The attacker doesn't know whether the data is encrypted or if it's just purely random bits. Is it possible (even theoretically) for the attacker to distinguish the encrypted data from ...
Is it possible to distinguish a securely-encrypted ciphertext from random noise?
Yes and no. The only cipher that provably has no such distinguisher is the [one-time pad][1]. For practical symmetric ciphers (e.g., AES), we cannot prove that no such distinguisher exists. The best we can do is say "A bunch of really smart folks have been trying to find such a distinguisher in order to gain fa...
Yes and no. The only cipher that provably has no such distinguisher is the [one-time pad][1]. For practical symmetric ciphers (e.g., AES), we have no proof that no such distinguisher exists or does not exist. The best we can do is say "A bunch of really smart folks have been trying to find such a distinguisher ...
> **Possible Duplicate:** > [Two untrusted party want to exchange data: how to insure each one gets the data it needs?](http://crypto.stackexchange.com/questions/1639/two-untrusted-party-want-to-exchange-data-how-to-insure-each-one-gets-the-data) <!-- End of automatically inserted text --> I am trying to come up ...
Two mutually untrusted parties want to exchange data: how to ensure each one gets the data it needs?
By "hand cipher", I mean a symmetric cipher for which encryption and decryption can can both be performed with a pencil on graph paper, consuming about 10-20 seconds per character by a proficient user. Additional simple tools, e.g. a deck of cards or a multiplication table, may be used to expedite the process. No mathe...
What is the most secure hand cipher?
By "hand cipher", I mean a symmetric cipher for which encryption and decryption can can both be performed with a pencil on graph paper, consuming about 10-20 seconds per character by a proficient user. Additional simple tools, e.g. a deck of cards or a multiplication table, may be used to expedite the process. No mathe...
The One Time Pad can be considered a secure hand executed cipher as long as you meet the security requirements of same, but why are you interested in such a method in this wonderfull age of high speed digital electronics???
Generate a 256-bit random nonce. XOR it with a 256-bit reusable symmetric key. This is `x`. For each `n`th block needed for the length of the plaintext, XOR `x` with `n` and hash it with SHA-256 to form `b[n]`. Let `p[n]` be the `n`th 256-bit block in the plaintext and `c[n]` be the `n`th block in the ciphertext....
Is SHA-256 secure as a CTR block cipher?
Well, as far as we know, the mode you suggest should be secure. Now, to be honest, AES256 versus your mode isn't quite a fair comparison; your mode gives somewhat less theoretical security; if you encrypt a known $2^n$ block message, the key can be recovered with $2^{256-n}$ effort; however, this observation doesn't r...
Well, as far as we know, the mode you suggest should be secure. Now, to be honest, AES256 versus your mode isn't quite a fair comparison; your mode gives somewhat less theoretical security; if you encrypt a known $2^n$ block message, the key can be recovered with $2^{256-n}$ effort; however, this observation doesn't r...
Generate a 256-bit random nonce. XOR it with a 256-bit reusable symmetric key. This is `x`. We represent numbers in simple binary instead of a counting function. `0` in dec = `[256 zeros]` in binary, `1` = `[255 zeros]1`, `23092348 ` = `[241 zeros]1011000000101110001111100`, etc. For each `n`th block needed for t...
_Background info:_ I am planning on making a filehost with which one can encrypt and upload files. To protect the data against any form of hacking, I'd like not to know the encryption key (K) used for a file, so the user will have to asymmetricly encrypt K and send it as well. The reason for this double encryption i...
_Background info:_ I am planning on making a filehost with which one can encrypt and upload files. To protect the data against any form of hacking, I'd like not to know the encryption key ($K$) used for a file, so the user will have to asymmetrically encrypt $K$ and send it as well. The reason for this double encryp...
How can one securely generate an asymmetric key pair from a short passphrase?
In a stream cipher, the bytes of the plaintext are usually XORed with the keystream to produce the ciphertext. Would there be anything wrong with adding the bytes instead (with overflow), if adding happened to be faster than XORing on a particular system?
If for authentication a user can own either A **OR** B public key instead of just one specific key is that equivalent to halving the key space. i.e. it it theoretically twice as easy to brute force and only equivalent to a 128 bit key?
Key space size when either of two public keys are valid for authentication?
I don't believe it's quite as simple as Ilmari is making it out to be, although his end result that "it doesn't really damage the security" is quite correct. It is easy to see that Ilmari's answer is actually a worse case; the attacker manages to run the same attack on both keys simultaneously, with negligible cost ...
If i am not wrong in cryptography there are 2 basic cryptographic schemes for public key cryptography.RSA encryption whose security is based on the infeasibility of solving the factoring of big primes problem and the ElGamal encryption which is as secure as the discrete logarithmic problem. The question is whether or n...
If i am not wrong in cryptography there are 2 basic cryptographic schemes for public key cryptography.RSA encryption whose security is based on the infeasibility of solving the factoring of big primes problem and the ElGamal encryption which is as secure as the discrete logarithmic problem. The question is whether or n...
Actually, for most applications where we want to use asymmetric encryption, we really want something a bit weaker: [key agreement][1] (also known as "key exchange"). When RSA or ElGamal is used for that, one party selects a random string, encrypts it with the public key of the other party, and the random string is used...
I'm wondering what information might be leaked from the [ecryptfs filesystem](https://en.wikipedia.org/wiki/ECryptfs). This is what Ubuntu uses if you check the box for "encrypted home directory" when using the desktop installer, so is probably quite widely used. Key characteristics of it: * each file is encrypted i...
I'm looking for information on known-plaintext attacks against XTEA. I'm most interested in the worst case scenario: if an attacker has all 8 bytes of input and all 8 bytes of output, how much information can they learn about the key (and how easily). Or I guess worse than that is if they have multiple such pairs of bl...
Known Plaintext attack against XTEA?
If i am not wrong in cryptography there are 2 basic cryptographic schemes for public key cryptography. RSA encryption whose security is based on the infeasibility of solving the factoring of big primes problem and the ElGamal encryption which is as secure as the discrete logarithmic problem. The question is whether or ...
I read that brute force attacks against a plaintext encrypted in OCB with unkown key **and** IV has approximately the same complexity as an attack where only the key is unknown. 1. Why is that ? 2. Is there a description of this attack ? If not, could you give me a hint on how this attack might work ?
I am wondering to what degree we can define an RSA variant, with a security argument that it is as safe as regular RSA with a given modulus size $m$ (e.g. $m=2048$), in which the public key has a compact representation of $k \ll m$ bits. We can fix the public exponent to our favorite customary value, e.g. $e=2^{16}+...
How much can we comress RSA public keys?
Suppose Alice sends messages to Bob by encrypting the messages with Bob's public key. Eve knows that the data is encrypted using RSA, but does not know the public key. Can Eve figure out the public key just by observing the encrypted messages? And if so, approximately how much data would it take for Eve to discov...
Is it possible to figure out the public key from encrypted text?
How much can we compress RSA public keys?
Actually, it appears that we can do a bit better by using an unbalanced RSA key; that is, one composed of two primes of different sizes. For example, suppose we have a 512 bit p and a 1536 bit q; to generate a key, we can select a random 512 bit prime p, and then for q, we search for a prime in the range $(C/p, (C+2...
I am wondering to what degree we can define an RSA variant, with a security argument that it is as safe as regular RSA with a given modulus size $m$ (e.g. $m=2048$), in which the **public** key has a compact representation of $k \ll m$ bits. We can fix the public exponent to our favorite customary value, e.g. $e=2^{...
I am wondering to what degree we can define an RSA variant, with a security argument that it is as safe as regular RSA with a given modulus size $m$ (e.g. $m=2048$), in which the **public** key has a compact representation of $k \ll m$ bits. We can fix the public exponent to our favorite customary value, e.g. $e=2^{...
I am wondering to what degree we can define an RSA variant, with a security argument that it is as safe as regular RSA with a given modulus size $m$ (e.g. $m=2048$), in which the **public** key has a compact representation of $k \ll m$ bits. We can fix the public exponent to our favorite customary value, e.g. $e=2^{...