instruction
stringlengths
15
30k
First up: I would try to avoid doing any cryptography using javascript… but that's just my personal opinion. One of the reasons is that Javascript code can't ask *"Am I really dealing with a random number generator, or with something provided by an attacker?"* Anyway, you could skip the libraries and take a look at...
First up: I would try to avoid doing any cryptography using javascript… but that's just my personal opinion. One of the reasons is that Javascript code can't ask *"Am I really dealing with a random number generator, or with something provided by an attacker?"* Anyway, if you really want to walk the Javascript path,...
I'm writing some software that requires the use of a CSPRNG with javascript for use in the browser and I'm wondering what libraries are available. Crypto-js doesn't seem to have a CSPRNG I can directly call (unless I missed it?). I've looked through the Stanford crypto js library, but I'm uncertain how much analysis th...
Are there any Javascript CSPRNGs?
I'm writing some software that requires the use of a CSPRNG with javascript for use in the browser and I'm wondering what libraries are available. Crypto-js doesn't seem to have a CSPRNG I can directly call (unless I missed it?). I've looked through the Stanford crypto js library, but I'm uncertain how much analysis th...
First up: I would try to avoid doing any cryptography using javascript… but that's just my personal opinion. One of the reasons is that Javascript code can't ask *"Am I really dealing with a random number generator, or with something provided by an attacker?"* Anyway, if you really want to walk the Javascript path,...
First up: I would try to avoid doing any cryptography using javascript… but that's just my personal opinion. One of many reasons is that Javascript code can't ask *"Am I really dealing with a random number generator, or with something provided by an attacker?"* Anyway, if you really want to walk the Javascript path,...
I need to take a potentially weak user password and derive a strong key for AES encryption in JavaScript. How can I do this? I expect the hardest problem is generating a good random salt - perhaps an SSL request could be used to ask a server to provide half of the salt. This would work but I'd rather keep it simple ...
How can I accomplish Key Derivation in JavaScript?
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 ...
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...
I was just looking at some [NIST PRNG recommendations][1], specifically at Hash_DRBG. I read briefly through the algorithm, and even though it is not overly complex, it still seems unnecessary to me. I asked myself how I would implement a (cryptographically secure) PRNG on top of a Hash algorithm (SHA256 or SHA512), wh...
Does evaluating the products of shares $a_jb_j$ give a secret sharing of $ab$? I think it's a no, but I am not sure on how to prove it.
In the article http://arstechnica.com/security/2013/11/how-an-epic-blunder-by-adobe-could-strengthen-hand-of-password-crackers/ there's a paragraph The passwords, according to password expert Steve "Sc00bz" Thomas, are encrypted in a mode known as ECB. That was a poor choice on the part of Adobe engineers,...
Can ECB mode really leak some characters?
I am currently working on a secure messaging website and I had been using RSA 2048 for encryption, decryption and signing of messages but I found it to be EXTREMELY LAGGY so i've moved to 1024. I did a timing test and these are my results (this was a test of generating a private key from the same string in cryptico....
RSA 896 vs 1024 vs 2048 in Javascript?
The article mentions that 3-DES was used to encrypt these passwords in ECB mode. DES has a 64-bit/8-byte block. So let's say you use ECB to encrypt a nine byte password. The first 8-bytes are encrypted using ECB. So far so good. But what happens when we come to the ninth byte? Well we're now in a new block but ...
In an [Ars Technica article](http://arstechnica.com/security/2013/11/how-an-epic-blunder-by-adobe-could-strengthen-hand-of-password-crackers) there's a paragraph > The passwords, according to password expert Steve "Sc00bz" Thomas, are encrypted in a mode known as ECB. That was a poor choice on the part of Adob...
In the recent Adobe passwords leak, presumably encrypted in 3DES ECB, second half of all 8-character passwords is identical: ioxG6CatHBw== Source: http://pastebin.com/iDTFARwq (guesses based on obvious password hints) L8qbAD3jl3jioxG6CatHBw== password BB4e6X+b2xLioxG6CatHBw== adobe123 j9p+HwtWWT/iox...
What does it mean if second half of 8-char string encrypted in 3DES is always identical?
I know I am in delay, but just to give my opinion: AES maybe secure , even RSA maybe secure but unlike one time pad they do not have a mathematical proof of secure. And the fact that NSA recommends to use AES give me some doubts. Do they recommend this because they know how to break it? Why the line communicatio...
Idea, not mine: to prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream. Questions (assume we have ...
Do per connection random keys solve the stream cipher key repetition issue?
I've been reading up a bit on deterministic password generators. All the ones I can find basically do something like this: 1. Pick a master username and a master passphrase. The username could be your email, or a PIN, or something else. The master passphrase can be subject to stringent requirements to ensure suffici...
If I have a long randomly generated key (k), XORed with a message (m), but since the message is longer than the key, there is a chance of reusing the keystream with the same message, but the key is used only onetime for every encryption process. In other words, every time I have to encrypt a message, I randomly generat...
The definition of Public Key Encryption(PKE) say that: PKE scheme is a triple of probabilistic polynomial time algorithm (PPT) (Gen,Enc,Dec). The definition of PPT say: In complexity theory, PP is the class of decision problems solvable by a probabilistic Turing machine in polynomial time, with an error probability of ...
The following idea is not mine: To prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream. Questio...
The definition of Public Key Encryption(PKE) say that: >A PKE scheme is a triple of probabilistic polynomial time algorithm (PPT) (Gen,Enc,Dec). The definition of PPT say: > In complexity theory, PP is the class of decision problems solvable by a probabilistic Turing machine in polynomial time, with an error proba...
In an [Ars Technica article](http://arstechnica.com/security/2013/11/how-an-epic-blunder-by-adobe-could-strengthen-hand-of-password-crackers) about Adobe's use of 3DES in ECB mode, there's a paragraph > The passwords, according to password expert Steve "Sc00bz" Thomas, are encrypted in a mode known as ECB. That was ...
I apologize if this question seems to be too easy I have been looking for material that could help me but I still haven't found any. For an RSA cryptography, we know that the modulo n is a product of two big prime numbers(say p and q). However, in some documents I see an extension of p=2p'+1 and q=2q'+1 with q' a...
I apologize if this question seems to be too easy I have been looking for material that could help me but I still haven't found any. For RSA cryptography, we know that the modulo $n$ is a product of two big prime numbers(say $p$ and $q$). However, in some documents I see an extension of $p=2p'+1$ and $q=2q'+1$ with ...
Why n=pq with p=2p'+1 q=2q'+1 instead of just n=p'q' for RSA crypto?
I apologize if this question seems to be too easy I have been looking for material that could help me but I still haven't found any. For RSA cryptography, we know that the modulo $n$ is a product of two big prime numbers(say $p$ and $q$). However, in some documents I see an extension of $p=2p'+1$ and $q=2q'+1$ with ...
I'm reading a Definition of Public Key Encryption and here say: > ... > Enc is a (possibly) probabilistic polynomial time encryption algorithm which takes as input a public key $pk$, a $m\in M$ and random coins $r$, and outputs a ciphertext $c\in C$. But in other papers, there is no mention of coins $r$. Can...
Can you give me an example of any PKC encrytion algorithm with coins?
What are the pros and cons of deterministic site-specific password generation from a master pass?
How are IVs used in association with RSA Encryption? Can someone explain why we use them in this RSA context?
How are IVs used in association with RSA Encryption?
Given is a square matrix $M$ over a field $F$. We have a key exchange with the following conditions: 1) $Person\, X$ sends a message to $Person\, Y$: $C_{1}=AM$, where $A$ is a randomly chosen square matrix. 2)$Person \, Y$ sends a message to $Person \, X$: $C_{2}=MB$, where $B$ is a randomly chosen square matr...
How to find a key or show that the protocal is secure?
Given is a square matrix $M$ over a field $F$. We have a key exchange with the following conditions: 1. $Person\, X$ sends a message to $Person\, Y$: $C_{1}=AM$, where $A$ is a randomly chosen square matrix. 2. $Person \, Y$ sends a message to $Person \, X$: $C_{2}=MB$, where $B$ is a randomly chosen square matri...
The following idea is not mine: To prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream (i.e. as th...
The following idea is not mine: To prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream (i.e. as th...
The following idea is not mine: To prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream (i.e. as th...
This cipher shifts the letter that it will shift to, after each shift... I used to play with this when I was a kid. I was thinking about it recently and realized that it wasn't as simple as I thought. Here's the description: "The second number makes the code much harder to break. It changes the number of letters ...
Is there a name for this 'enhanced' caeser shift and if so, is it trivial to break?
How to design a secure data container?
There isn't a specific name that describes this as an individual cipher. It is indeed a Ceasar cipher that merely differs from the cipher Ceasar himself used as it uses two (or more) numbers to shift the alphabet. Looking at your description a bit closer, it is actually somewhere half-way between a *Ceasar cipher* ...
There isn't a specific name that describes this as an individual cipher. It is indeed a Ceasar cipher that merely differs from the cipher Ceasar himself used as it uses two (or more) numbers to shift the alphabet. Looking at your description a bit closer, once could even think it is actually somewhere half-way betw...
There isn't a specific name that describes this as an individual cipher. It is indeed a Ceasar cipher that merely differs from the cipher Ceasar himself used as it uses two (or more) numbers to shift the alphabet. Looking at your description a bit closer, once could even think it is actually somewhere half-way betw...
There isn't a specific name that describes this as an individual cipher. It is indeed a Caesar cipher that merely differs from the cipher Caesar himself used as it uses two (or more) numbers to shift the alphabet. Looking at your description a bit closer, once could even think it is actually somewhere half-way betw...
There isn't a specific name that describes this as an individual cipher. It is indeed a **Caesar cipher** that merely differs from the cipher Julius Caesar himself used as it uses two (or more) numbers to shift the alphabet. Looking at your description a bit closer, one could even think it is somewhere half-way bet...
**Identification** There isn't a specific name that describes this as an individual cipher. It is indeed a *"Caesar cipher"* that merely differs from the cipher Julius Caesar himself used as it uses two (or more) numbers to shift the alphabet. Looking at your description a bit closer, one could even think it is ...
The following idea is not mine: To prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream (i.e. as th...
**Identification** There isn't a specific name that describes this as an individual cipher. It is indeed a *"Caesar cipher"* that merely differs from the cipher Julius Caesar himself used as it uses two (or more) numbers to shift the alphabet. Looking at your description a bit closer, one could maybe even think it i...
The following idea is not mine: To prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream (i.e. as th...
In studying modern (and classical) cryptography, many notions from information theory crop up. Unicity distance, min-entropy, compression, encoding, etc. What parts of information theory should be part of the knowledge corpus of a working cryptographer?
What aspects of information theory are used in modern cryptography?
Currently I'm working on a presentation of a paper that talks about the factorization of large numbers. In the paper elliptic curves are presented as a way to factorize large numbers. After hearing a lot about elliptic curves it's the first time that I delve into the details of elliptic curves and I'm a bit bit baffled...
Elliptic Curve Factorization: Why are elliptic curves suited for this kind of task?
The following idea is not mine: To prevent possible stream cipher key repetition given unreliable storage, provided only that your RNG works and at the cost of some bytes per connection, start the connection with a random cipher key that is not stored on disk and is used to encrypt the rest of the stream (i.e. as th...
Edits: added then removed additional cases that on reflection seem like a bad idea. In fact, this whole line of thought seems like a complicated way to get a bigger nonce, which might be better accomplished with something like XSalsa20 which was designed for that. I will accept the "just use the right tool" answer, b...
Currently I'm working on a presentation of a paper that talks about the factorization of large numbers. In the paper elliptic curves are presented as a way to factorize large numbers. After hearing a lot about elliptic curves it's the first time that I delve into the details of elliptic curves and I'm a bit bit baffled...
My bank's website uses HTTPS with the cipher suite `ssl_rsa_with_rc4_128_md5`. What are the known weaknesses of this suite? Do they have a practical impact for banking-related communications?
Given is a square matrix $M$ over a field $F$, we have a key exchange with the following conditions: 1. Person $X$ sends a message to Person $Y$: $C_{1}=AM$, where $A$ is a randomly chosen square matrix. 2. Person $Y$ sends a message to Person $X$: $C_{2}=MB$, where $B$ is a randomly chosen square matrix. 3. Both...
One observation is that if we modify the problem so that $M, A, B$ are random invertible matrices, then it is easy to prove the security of the system. In fact, we can prove that the system is informationally secure; that is, for any observed $C_1, C_2$ pair, for any possible value of $K$, there is a unique set of val...
One observation is that if we modify the problem so that $M, A, B$ are random invertible matrices, then it is easy to prove the security of the system. In fact, we can prove that the system is informationally secure; that is, for any observed $C_1, C_2$ pair, for any possible value of $K$, there is a unique set of val...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. Given the nature of the design, I've recognized the following properties\requirements: - Message payload will approx. b...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. Given the nature of the design, I've recognized the following properties\requirements: - Message payload will approx. b...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. Given the nature of the design, I've recognized the following properties\requirements: - Message payload will approx. b...
Some time ago I was working in a pet project for a type of database engine. And I thought about securing the data in disk with encryption.. and since the main code was already developed.. I had a few requirements.. - a simple stream class that I could hook instead of my file stream had - to support random access ...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. Given the nature of the design, I've recognized the following properties\requirements: - Message payload will approx. b...
> How far am I from a solution? > Is this completely insecure? I'm sorry to say, but: This is insecure, because the cipher is not as strong as modern stream ciphers are. The key setup procedure has some similarities to RC4, but RC4's key setup is known to be quite weak. The modern stream ciphers currently have m...
> How far am I from a solution? > Is this completely insecure? I'm sorry to say, but: This is insecure, because the cipher is not as strong as modern stream ciphers are. The key schedule procedure has some similarities to RC4, but RC4's key schedule is known to be quite weak. The modern stream ciphers currently ...
I'm not sure why in Goldwasser-Micali with a Blum integer N, -1 is always a illegel message. Can you give me some direction for starting? What is illegal message's meaning?
You say that "Every message is encrypted using a randomly chosen AES key." and "Messages frequency will be ~8 per second; so 8 * (N-1) messages per second for N peers." and "Message payload will approx. be in the range 128-512 bytes; in any case it will most certainly not exceed 1024 bytes." It sounds like a very ...
We are given n (public modulus) where n=pq and e (encryption exponent). Then I was able to crack the private key d, using Wieners attack. So now, I have (n,e,d). My question is, is there a way to calculate p and q from this information? If so, any links and explanation would be much appreciated!
So for a Diffie-Hellman problem, I am given the prime $p$ for the Diffie-Hellman exchange. I am also given $g$, secret number for machine as $A$, secret number for station as $B$, a Diffie-Hellman shielded Login Name $V$, and Diffie-Hellman shielded password $W$. For this problem, I am given three users and see whi...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. More specifically, it's distributed lockstep used in most (all?) RTS games. Given the nature of the design, I've recognize...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. More specifically, it's distributed lockstep used in most (all?) RTS games. Given the nature of the design, I've recognize...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. More specifically, it's distributed lockstep used in most (all?) RTS games. Given the nature of the design, I've recognize...
What's the difference between hash function collision resistant and Target Collision resistant?. I know the definition of hash function collision resistant but I don't know about Target Collision Resistant.
Let's assume a ciphertext only attack, and compare it to Vigenere. Your scheme is on a quite similar level of security: It might be hard to break it without a computer, but with one it is probably done in seconds. Here's how: First, your permutation is static and only depends on the number of rounds and the length o...
IV is not commonly used in RSA Encryption. Do you mean: 1. AES Encryption? AES Encryption in some modes, for instance CBC or CFB uses IV (Initial Vector), which is (often) unpredictable value that never repeats for the same key. It is fairly common to generate IV randomly 2. Random padding in RSA Encryption? T...
I have an unsubscribe link, which needs to be passed a customer id, and a product id, producing a query string something like: ?cid=100&pid=2 I would like to ensure the customer is the one doing the unsubscribing, and that they are unsubscribing from the exact product. HMAC seems like a logical choice: ...
[Pre-image resistant but not 2nd pre-image resistant?](http://crypto.stackexchange.com/questions/9684/pre-image-resistant-but-not-2nd-pre-image-resistant) describes the relationship between the three basic hash function security notions: Collision Resistance, Second Preimage Resistance and Preimage Resistance. In sh...
[Pre-image resistant but not 2nd pre-image resistant?](http://crypto.stackexchange.com/questions/9684/pre-image-resistant-but-not-2nd-pre-image-resistant) describes the relationship between the three basic hash function security notions: Collision Resistance, Second Preimage Resistance and Preimage Resistance. In sh...
I found this question from a textbook but I don't really understand what it is asking: Suppose c is 1 block long, a and b are strings that are a multiple of the block length, and CBC-MAC(a||c) = CBC-MAC(b||c). An ideal block cipher is used in CBC-MAC. Explain for which most general class of messages d, CBC-MAC(a...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. More specifically, it's distributed lockstep used in most (all?) RTS games; *somewhat similar* to: [Age of Empires][1]. Gi...
Currently I'm doing some initial research for a fully connected distributed network communication model. The context here is a peer-to-peer multiplayer protocol, using a majority-voting system. More specifically, it's distributed lockstep used in most (all?) RTS games; *somewhat similar* to: [Age of Empires][1]. Gi...
What is so special about elliptic curves?
I found this question from a textbook but I don't really understand what it is asking: Suppose $c$ is $1$ block long, $a$ and $b$ are strings that are a multiple of the block length, and $CBC-MAC(a||c) = CBC-MAC(b||c)$. An ideal block cipher is used in CBC-MAC. Explain for which most general class of messages $d$...
I found this question from a textbook but I don't really understand what it is asking: Suppose $c$ is $1$ block long, $a$ and $b$ are strings that are a multiple of the block length, and $CBC-MAC(a||c) = CBC-MAC(b||c)$. An ideal block cipher is used in $CBC-MAC$. Explain for which most general class of messages $...
There seems to be sources like [this], this [also], and some [introductions] that discuss elliptic curves in general and how they're used. But what I'd like to know is why these particular curves are so important in cryptography as opposed to, let's say, any other polynomial degree $\gt$ 2 which you can then mod over ...
There seems to be sources like [this], this [also], and some [introductions] that discuss elliptic curves in general and how they're used. But what I'd like to know is why these particular curves are so important in cryptography as opposed to, let's say, any other polynomial degree $\gt$ 2 which you can then mod over ...
There seems to be sources like [this], this [also], and some [introductions] that discuss elliptic curves in general and how they're used. But what I'd like to know is why these particular curves are so important in cryptography as opposed to, let's say, any other polynomial degree $\gt$ 2 which you can then mod over ...
I'm sorry if my English is bad ;D N=PQ, where P=2p+1 and Q=2q+1. P,Q,p,q are prime number. QR_{N} is quadratic residu modulo N. 1. Please help me to prove QR_{N} is Cyclic Group ;D. Note: QR_{P} and QR_{Q} are cyclic group. 2. How to find/determine generator for QR_{N} ??? ;D
Elliptic curves are not the only curves that have groups structure, or uses in cryptography. But they hit the sweet spot between security and efficiency better than pretty much all others. For example, conic sections (quadratic equations) do have a well-defined geometric addition law: given $P$ and $Q$, trace a line...
For a hash function, what's the difference between Collision Resistance and Target Collision Resistance?. I understand the definition of hash function collision resistance, but I don't know about Target Collision Resistance.