instruction
stringlengths
15
30k
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...
I have a function f(x,n) that takes a 128-bit key x, and generates n bytes of pseudo-random data. I've tested the output bytes this function for various keys with the NIST RNG testing suite (NIST Special Publication 800-22 A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applicat...
Is any decent RNG acceptable as a stream cipher?
I have a function f(x,n) that takes a 128-bit key x, and generates n bytes of pseudo-random data. I've tested the output bytes this function for various keys with the NIST RNG testing suite (NIST Special Publication 800-22 A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applicat...
I have a function f(x,n) that takes a 128-bit key x, and generates n bytes of pseudo-random data. I've tested the output bytes this function for various keys with the NIST RNG testing suite (NIST Special Publication 800-22 A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applicat...
Suppose you're connected to a vpn server via sstp vpn, and then you're trying to sign in your webmail account that is already secured with a ssl certificate, i.e hushmail.com. Howerver it seems your original data traffic is double-encrypted by both SSTP & SSL. Now suppose that for any reason your sstp connection is hij...
In an **abstract** sense, aren't both the same? Don't their definitions boil down to the following? * **security through obscurity:** trying to make sure some information cannot be obtained without knowing the secret _method_ * **encryption:** trying to make sure some information cannot be obtained without...
What is the actual difference between security through obscurity and true encryption?
Assuming that the keys used for the SSL and SSTP layers are independent (which they should be, since both layers have their own separate key setup processes), compromising the outer layer (SSTP) cannot make the inner layer (SSL) any less secure than it would be if used alone. To see why this is, imagine that there w...
Suppose you're connected to a VPN server via an SSTP VPN, and then you're trying to sign in to your webmail account that is already secured with an SSL certificate, e.g. hushmail.com. However, it seems your original data traffic is double-encrypted by both SSTP & SSL. Now suppose that for any reason your SSTP connec...
[Multiple encryption](http://en.wikipedia.org/wiki/Multiple_encryption), cascade ciphering or superencryption refers to the process of encrypting the same data several times. A well known result by Maurer and Massey (1993) shows that, under very general assumptions, a multiple encryption scheme is at least as secure...
This is an exam question an i have no idea how to recover the message m. John wants to send an encrypted message to mary who has a pair of RSA keys, However, John does not know Mary's public key and so John sends an email to Mary to ask for the key. mary's email reply is intercepted by Peter who replaces Mary's pub...
RSA Attack How to recover this message?
This is an exam question an i have no idea how to recover the message m. John wants to send an encrypted message to mary who has a pair of RSA keys, However, John does not know Mary's public key and so John sends an email to Mary to ask for the key. mary's email reply is intercepted by Peter who replaces Mary's pub...
We often mock "security through obscurity", but it is not without value, especially in today's web environment. Most attacks today are statistical in nature: a virus attempts to infect 10,000 computers by blasting out random attacks. If it infects even two more computers out of those 10,000, it has achieved its go...
Hopefully Crypto can help me understand homomorphic cryptosystems. I'm designing a high score server for a game I made, and because of facets in the language i'm using, the player would be able to look through the code and execute functions in my game, so I'm trying to encrypt the score when it is sent to the serve...
Yes, homomorphic encryption operations are malleable by definition. The definition of "malleable" is something along the lines of "can be intelligently modified", which is what homomorphic encryption allows you to do. > That you can preform operations on two unknown (encrypted) ciphertexts, $\epsilon(x_1)$ and $\eps...
Yes, homomorphic encryption operations are malleable by definition. The definition of "malleable" is something along the lines of "can be intelligently modified", which is what homomorphic encryption allows you to do. > That you can preform operations on two unknown (encrypted) ciphertexts, $\epsilon(x_1)$ and $\eps...
Hopefully Crypto can help me understand homomorphic cryptosystems. I'm designing a high score server for a game I made, and because of facets in the language i'm using, the player would be able to look through the code and execute functions in my game, so I'm trying to encrypt the score when it is sent to the serve...
I understand that for example MD5 produces a 128 bit hash value from a given text of variable size. My question is if there is a hash-like algorithm that will produce a hash value where one can specify the length of the outcome? So one would specify that that given any input the hash value (output) should be say 1000 b...
I am using AES encryption (Rijindael) with Base-64 encoding in Obj-C and VB. I am currently using the following two projects to achieve this: Obj-C: https://github.com/dev5tec/FBEncryptor/tree/3c739f18c94ea257aba5cb7b6a97f49af2589977 Visual Basic: http://www.codeproject.com/Articles/15280/Cryptography-101-for-th...
Are there hash algorithms with variable length output?
i try to find some measurement for identifying and distinguishing between compressed and random data. i tried this first by computing the entropy of such data, the entropy value is extremely high (almost maximum) in both cases so there is no way to distinguish. I read about the chi square algorithm but i never used ...
I am trying to find some measurement for identifying and distinguishing between compressed and random data. I tried this first by computing the entropy of such data, the entropy value is extremely high (almost maximum) in both cases, so that way does not seem to work as a distinguisher. I read about the chi square a...
I'm curious about your purpose. Generally the primary operation involving a message digest is ultimately to compare two digest values. Hashing passwords allows comparing the digest values instead of carrying the super secret password around the systems. Hashing messages allows the transmitter and sender to verify th...
I want to store files (images) on a public webserver and let users see them if they know a password. The server shouldn't have the unecrypted files and the server can only serve files, not perform any server-size computation. One thing that I know about crypto is that I know very little so I'd like a review of the ...
How do I store encrypted files on a web server and decrypt them locally?
You were doing fine up to the point where you wrote "JavaScript". Of course, JavaScript as a language is not fundamentally unusable for crypto (although, as a high-level scripting language, any crypto primitives implemented in JavaScript are likely to be rather slow and hard to secure against side channel attacks). ...
You were doing fine up to the point where you wrote "JavaScript". Of course, JavaScript as a language is not fundamentally unusable for crypto (although, as a high-level scripting language, any crypto primitives implemented in JavaScript are likely to be rather slow and hard to secure against side channel attacks). ...
Why not try to follow official recommendations? Skim through some of these documents and I am sure you can find a good suggestion? http://csrc.nist.gov/groups/STM/cavp/ Also, I also suggest that you try to only use FIPS140 validated components if possible. If applicable. Basically make sure you know the end-re...
Hopefully Crypto can help me understand homomorphic cryptosystems. I'm designing a high score server for a game I made, and because of facets in the language i'm using, the player would be able to look through the code and execute functions in my game, so I'm trying to encrypt the score when it is sent to the serve...
Yes, homomorphic encryption operations are malleable by definition. The definition of "malleable" is something along the lines of "can be intelligently modified", which is what homomorphic encryption allows you to do. > That you can preform operations on two unknown (encrypted) ciphertexts, $\epsilon(x_1)$ and $\eps...
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...
I want to store a hash for authenticating a password. I also want to use the same password for decryption. Can I use PBKDF2 for both? (I plan to use different salts for the authentication and the decryption, of course, because otherwise the authentication result would be the decryption key!) Is that appropriate/s...
Can I use PBKDF2 for authentication and decryption?
You were doing fine up to the point where you wrote "JavaScript". Of course, JavaScript as a language is not fundamentally unusable for crypto (although, as a high-level scripting language, any crypto primitives implemented in JavaScript are likely to be rather slow and hard to secure against side channel attacks). ...
See my answer to [Blum Blum Shub vs. AES-CTR or other CSPRNGs](http://crypto.stackexchange.com/q/3454/351), which cites references that provide detailed analysis of this question and answers this question for some specific examples. I see no point on repeating it here. The short summary: How many bits should you ex...
See my answer to [Blum Blum Shub vs. AES-CTR or other CSPRNGs](http://crypto.stackexchange.com/q/3454/351), which cites references that provide detailed analysis of this question and answers this question for some specific examples. I see no point on repeating it here. The short summary: How many bits should you ex...
I am encrypting and storing sensitive values in the database. I have a set max length in the database, but in order to provide useful user feedback, I'd like to know the max input I should allow for a given database length. I can throw together a test that brute forces an answer, but I'd like to understand more gene...
How do I calculate the maximum plain text length allowable for a certain cipher text length?
I want to store files (images) on a public webserver and let users see them if they know a password. The server shouldn't have the unecrypted files and the server can only serve files, not perform any server-size computation. One thing that I know about crypto is that I know very little so I'd like a review of the ...
I want to store files (images) on a public webserver and let users see them if they know a password. The server shouldn't have the unecrypted files and the server can only serve files, not perform any server-size computation. One thing that I know about crypto is that I know very little so I'd like a review of the ...
can anybody explain to me what data structure results after data is compressed? I just try to find out the difference between random data and compressed data, the entropy of both is very high while the distribution seems to be different (e.g. when I use chi-square-test). i hope somebody can help me and thanks in adv...
I am trying cryptanalyse a cipher–text encrypted by Affine cipher. The affine encryption formula looks in this way: a*x + b = c An ‘a’ and a ‘b’ are constants. X- plain-text letters, c- cipher letter. This is what I got so far: 4 -> 17 19 -> 10 That means that letter 4 has been encrypted into 17 (number...
I am trying cryptanalyse a cipher–text encrypted by Affine cipher. The affine encryption formula looks in this way: a*x + b = c An ‘a’ and a ‘b’ are constants. X- plain-text letters, c- cipher letter. This is what I got so far: 4 -> 17 19 -> 10 That means that letter 4 has been encrypted into 17 (number...
I am trying to cryptanalyse a cipher–text encrypted by Affine cipher. The encryption formula is: $c = f(x) = (ax+b)\bmod m$, where $a$ and $b$ are unknown constants; $x$ is a plain-text symbol, and $c$ the corresponding cipher-text symbol, both in range $[0\dots m-1]$; $m=26$ is known. This is what I got so far...
In Zero Knowledge auth schemes the public DH factor of each peer is encrypted with a potentially weak pre-shared secret and the resulting ciphertexts are exchanged over an insecure channel. Why is no attack on the weak secret possible? I mean the messages can be sniffed and with an offline dictionary attack or simpl...
i want to know how many RSA 1024 bit long key decryption can a regular pentium4 computer do per second ? how to calculate RSA performance and determinate remaining time ?
i want to know how many RSA 1024 bit long key decryption can a regular pentium4 computer do per second ? how to calculate RSA performance and determine its remaining time ?
Is it possible to generate an Ed25519 keypair that has a very similar public key as another keypair (fooling a casual visual comparison) or is this as hard as solving one of SHA-512 or the discrete logarithm problem?
Is it possible to pick your Ed25519 public key?
If it isn't already apparent from the title of my question, i should make clear that I have only a very basic understanding of homomorphic encryption. I would like to know why homomorphic encryption schemes cannot support algorithms with conditions/branching, and what the likely impact will be on the overall adopti...
Why can't Homomorphic encryption schemes support algorithms with conditions/branching?
I am trying to understand the ExpandKey function used in the bcrypt hashing algorithm. As per the documentation of bcrypt hashing algorithm on USENIX here: http://static.usenix.org/event/usenix99/provos/provos_html/node4.html There is only one invocation of the ExpandKey function with the 128 bit salt value. A...
Programs like KeyPass and 1Password store password database files encrypted by a single password. If someone knows the protecting password ("Vault Key"), they can read the entire database ("secrets"). Being part of a family, I sometimes share passwords with my wife and others for bank accounts or Netflix which we ma...
The core of the problem is finding a near first pre-image on the function $A = aB$ on an elliptic curve, where $A$ is the public key, and $a$ the private key¹. For a normal hash function you $ 2^m $ operations to fix $m$ specific bits.² In particular a full pre-image takes $ 2^n $ hash function calls. A full pre...
1-in AES we use some padded bytes at end of message to fit 128/256 byte blocks. but as RSA is not a block cipher why we use padding ? 2-can message be any byte long as we like or must be certain byte long to use RSA encryption ?
why we use padding for rsa if its not a block cipher?
1. Why do we use padding? --- Both block ciphers and RSA are permutations on a block(RSA's block isn't an integral number of bytes), so it's clear that both of them need some kind of padding if the data size doesn't correspond to the block size. With block ciphers the padding doesn't do much: It fills up the rem...
1. In AES we use some padded bytes at end of message to fit 128/256 byte blocks. But as RSA is not a block cipher why is padding used? 2. Can the message size be any byte length (is the encrypting agent free to choose) or must it be a certain byte length to use RSA encryption ?
Why is padding used for RSA encryption given that it is not a block cipher?
I have just advanced to the last grade of high school (in Denmark). In this year, we all get to do one big project, where we can build/invent/create whatever we want to "solve a problem". As I study Math, IT and electronics, I would like to build something where all these 3 subjects are included. I have thought about a...
1. **Would it be useful for companies who need to keep their data safe?** No, a one-time-pad is only useful in very rare circumstances. The main issue is key-management. You can only use each pad once, it's as large as the data you want to encrypt, and you need to get it to all parties in a secure way. The dir...
can someone tell me how a changing key length affects the ciphertext, not only in case of AES, but in general? I know the key spaces becomes much larger and the number of rounds in case of AES changes, but is security really that much enhanced that if I choose 256 bits as key length it is sort of unbreakable? Someth...
for example in RSA we use this for encryption : ciphertext = m^e (mod n) and for decryption so if our message is "hello world" then what number we have to put as **m** in RSA formula ?
how ciphers change plaintext into numeric digits for computing?
I have the following problem: There are $n$ users and each users fills in three data points per day, this are three integers between say $-10$ and $10$. I have access to the database and hence I am able to modify this data. However, I want to "sign" the data. How can this be done in such a way that I am unable to c...
The Vigenere cipher can relatively easy be broken when the key size is small compared to the size of the message. One first finds the length of the key, and then uses frequency analysis to actually find the key. (1) How can one "add" something non-complicated to the Vigenere cipher to make it harder to break? Would ...
1. In AES we use some padded bytes at end of message to fit 128/256 byte blocks. But as RSA is not a block cipher why is padding used? 2. Can the message size be any byte length (is the encrypting agent free to choose) or must it be a certain byte length to use RSA encryption?
1. Why do we use padding? --- Both block ciphers and RSA are permutations on a block(RSA's block isn't an integral number of bytes), so it's clear that both of them need some kind of padding if the data size doesn't correspond to the block size. With block ciphers the padding doesn't do much: It fills up the rem...
Yes. Use append-only logs, or a cryptographic timestamping service. These approaches are generally designed to solve the problem you mentioned, namely: detecting tampering with data or post-dating of old data. See the following resources on this site and our sister site, Security.SE: * [Techniques for ensuring ...
Elgamal is a cryptosystem that is homomorphic over multiplication. 1. How can I convert it to an additive homomorphic cryptosystem? 2. How can I use this additive homomorphic Elgamal cryptosystem for E-voting purpose? Please explain with examples.
Can Elgamal be made additively homomorphic and how could it be used for E-voting?
I can encrypt some data D using a random symmetric key K, obtaining a ciphertext C, and then encrypt K with my public key Pub and obtain H. So far so good: I can only decrypt C if I have H and my private key Priv. My goal is to only bring around Priv, and keep both C and H on a public server. Assume C is too large to b...
I have the following problem: There are $n$ users and each users fills in three data points per day, this are three integers between say $-10$ and $10$. I have access to the database and hence I am able to modify this data. However, I want to "sign" the data. How can this be done in such a way that I am unable to c...
Someone wants to change key material in many remote devices using RFC-3394 key wrap. They want to use their current keys in the key wrap to send the new keys (no separate/master key-wrap-key). I could not find a clear prohibition for this, and [here is the best I could find on this site][1]. Can anyone help with a bett...
I came up with a truly new method of applying modulo-2-addition encryption function in stream ciphers which is inspired by a mechanism used to prove a mathematical theorem. How can I determine whether my method is cryptographically correct and considerable? If so, how can I officially submit or formally register it in ...
How to submit a new method of encryption?
How does a changing key length affects the ciphertext, not only in case of AES, but in general? I know that the key spaces become much larger and the number of rounds in case of AES changes, but is security really that much enhanced that if I choose 256 bits as key length it is sort of unbreakable? Something else wh...
What is the effect of the different AES key lengths?
It is not really clear what you propose instead of the original algorithm - using `ExpandKey(state, salt, key)` instead of `ExpandKey(state, 0, key)`? What about the second call `ExpandKey(state, 0, salt)`?. You are right, each `ExpandKey(state, 0, xxx)` contains one XOR-ing of `xxx` into the P-array, and then Blowf...
**How can I determine whether my method is cryptographically correct?** Well, that depends quite a bit on what your primitive does, and what security properties you claim for it. As for examples of security properties, you might claim it does privacy (someone without the key cannot determine anything about the plai...
1. **Would it be useful for companies who need to keep their data safe?** No, a one-time-pad is only useful in very rare circumstances. The main issue is key-management. You can only use each pad once, it's as large as the data you want to encrypt, and you need to get it to all parties in a secure way. The dir...
If you wanted to do it yourself then I think something like this is what you would want to implement with a low threshold..and then write your own KeyPass....? http://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing You would definitely have to build a Secret Sharing Password Vault by yourself. No well known ...
I need a method to authenticate a process with another in order to establish interprocess communication between them, to prevent malicious processes from trying to hook onto the system. Currently I just send a password in plaintext between the two processes and the host process just performs a string comparison with it...
Is there a way to make RC4 (ARCFOUR) secure, or is it completely broken?
A few observations: 1. RC4 suffers from related key attacks. This means your idea of concatenating a 224 bit key and a 32 bit IV is not a good idea. You should rather use $\operatorname{SHA-256}(Key||IV)$ 2. Remember that a (Key, IV) pair must not be reused, ever. A 32 bit IV can work if it's a counter, but IM...
A few observations: 1. RC4 suffers from related key attacks. This means your idea of concatenating a 224 bit key and a 32 bit IV is not a good idea. You should rather use $\operatorname{SHA-256}(Key||IV)$ 2. Remember that a (Key, IV) pair must not be reused, ever. A 32 bit IV can work if it's a counter, but IM...
Although , much of the literature and latest papers suggests , Homomorphic Encryption is still not practical yet . How is [ciphercloud][1] able to achieve the same ? anyone has any idea ? Not much is known about how their doing from their website [1]: http://www.ciphercloud.com/
any idea how ciphercloud is doing HomomorphicEncryption?
Much of the literature and latest papers suggest, that homomorphic encryption is still not practical yet. How is [ciphercloud][1] able to achieve the same? Does anyone have an idea? Not much is known about how they're working from their website. [1]: http://www.ciphercloud.com/
No, RC4 is not completely broken. It is *possible* to use it properly. It's just not very likely that an average developer will do so. RC4 is not a good choice for new systems. It is tricky to use properly. There are some serious pitfalls which, if you're not an expert cryptographer, can bite you in the butt. I...
It's not likely that anyone here knows anything non-public about Ciphercloud. I think a more interesting question is: How could you encrypt data in a database, in a way that allows you to achieve these goals? What are the best cryptographic techniques currently known, for that goal? As it happens, that question ha...
Much of the literature and latest papers suggest that homomorphic encryption is still not practical yet. How is [CipherCloud][1] able to achieve the same? Does anyone have an idea? Their website does not provide much information about how their system works. [1]: http://www.ciphercloud.com/
How is CipherCloud doing homomorphic encryption?
Someone wants to change the key material in many remote devices using the RFC 3394 key wrap algorithm. They want to use their current data-encryption key as a key-wrapping key, to encrypt the new keys and send them to the remote devices (no separate/master key-wrap-key). Is it OK to re-use a key that is currently bein...
Is it OK to use a data-encryption key for key wrapping, too?
I'm wondering if there are other resources that cover Carter-Wegman style message authentication, besides the sources themselves. Is there an online text or a book that covers their ideas? I'd prefer something that's very thorough, and less importantly, free. I'm just really trying to get a feel for their ideas ...
Is there another resource for Carter-Wegman-style message authentication?
I need a method to authenticate a process with another in order to establish interprocess communication between them, to prevent malicious processes from trying to hook onto the system. Currently I just send a password in plaintext between the two processes and the host process just performs a string comparison with it...