instruction
stringlengths
15
30k
This is a program that I found which takes a purely alphabetical message, converts the letters to their ASCII values and combines them with the ASCII values of an alphabetical key (wrapping around when it gets to Z). {**EDIT**: I should emphasize here that the key being used is fully random and is at least a long ...
I am reading the paper [Software Protection and Simulation on Oblivious RAMs](http://dl.acm.org/citation.cfm?id=233553) by Oded Goldreich and Rafail Ostrovsky. And I wonder about the description of the "Square Root" solution of oblivious RAM simulation at page 20. The algorithm seems simple: the aim is to 'simluate...
I am reading the paper [Software Protection and Simulation on Oblivious RAMs](http://dl.acm.org/citation.cfm?id=233553) by Oded Goldreich and Rafail Ostrovsky. And I wonder about the description of the "Square Root" solution of oblivious RAM simulation at page 20. The algorithm seems simple: the aim is to 'simluate...
I'm working with openssl cryptographic libraries, I'm new to all these cryptographic stuffs and slowly I'm learning all these. I have a doubt regarding random number generator, I'm using `RAND_pseudo_bytes()` for generating a pseudo random number. I'm providing a seed to it with my required entropy. But my doubt is if ...
I'm using Lagrange's Interpolation technique to reconstruct the secret from a set of point pairs (x,y). Since I only need the secret, not the whole polynomial, I have simplified the reconstruction process as follows: Let Secret D = 10, and we use a 3 out of 3 secret sharing scheme which generates 3 key pairs ...
I'm using Lagrange's Interpolation technique to reconstruct the secret from a set of point pairs (x,y). Since I only need the secret, not the whole polynomial, I have simplified the reconstruction process as follows: > Let Secret $D = 10$, and we use a 3 out of 3 secret sharing scheme which generates 3 key pai...
I'm using Lagrange's Interpolation technique to reconstruct the secret from a set of point pairs (x,y). Since I only need the secret, not the whole polynomial, I have simplified the reconstruction process as follows: > Let Secret $D = 10$, and we use a 3 out of 3 secret sharing scheme which generates 3 key pai...
First, the passage you refer to is on page 55, 2nd paragraph. And it would also be great if you'd announce that figure 4.1 is actually in a different document ;-) took me quite a while to figure this out. Now to your question. So, I assume you understand the paragraph? You have to note that a round here corresponds ...
As for your questions: > In finite field arithmetic, negating x ($−x$) is really $0−x$, which is actually $0 \oplus x$ (XOR), and it ends up being x itself, am I right? In any finite field, $-x$ is defined to be $0-x$, and in a field of characteristic two (which you are working with), yes, $-x = x$ > Is there ...
I've searched some information on ECC, but so far I have only found Diffie-Hellman key-exchange implementations using ECC, but I don't want to exchange keys, I want to encrypt & decrypt data like in ElGamal. I know that ElGamal with elliptic curves should be possible (Since ElGamal is based on DH), but I have no idea ...
As for your questions: > In finite field arithmetic, negating x ($−x$) is really $0−x$, which is actually $0 \oplus x$ (XOR), and it ends up being x itself, am I right? In any finite field, $-x$ is defined to be $0-x$, and in a field of characteristic two (which you are working with), yes, $-x = x$ > Is there ...
"Key size" or "number of bits" isn't the best way to measure security. Those are intermediate numbers. The true question at the heart of the matter is "how long can I expect method X to keep my secrets safe?" From there, we walk backwards to determine what adjustments or parameters we can change while using that par...
I've stumbled (jobwise) over a system where small messages (512 Bytes or less) are encrypted and decrypted using a simple XOR using a OTP. That OTP is created using a seed based on the individual user passwords and a simple PRNG. I'm currently seeing the following problem: Alice always keeps her password absolutely ...
Do any (non-hardware) RNGs exist which could be used to create an OTP for crypto purposes?
Use `gpg --s2k-mode 3 --s2k-count N`, where `N` is the number of iterations you want to use. The manual page says the default is 65536, and you can use any number between 1024 and 65011712. If you like to tweak the defaults, I suggest making this number as large as you can bear it, without introducing noticeable sl...
Can somebody explain (or point to a reference) why the *Schnorr protocol* cannot be proved zero knowledge?
Perfect zero knowledge for the Schnorr protocol?
When dealing with cryptographic data, is there a chance that attacker recovers portion of data I used in my program? Should I try to delete every bit of keys and encrypted data that I used, overwrite it with zeroes? And one extra, how is situation different in languages with garbage collection like Python or Java?
Should I delete cryptographic data from memory?
From a draft of the IEEE spec, > "An XTS-AES key shall not be associated with more than one key scope. > The reason is that encrypting more than one block with the same key > and the same index introduces security vulnerabilities that might > potentially be used in an attack on the system. In particular, key > ...
From [a draft of the IEEE spec][1], > "An XTS-AES key shall not be associated with more than one key scope. > The reason is that encrypting more than one block with the same key > and the same index introduces security vulnerabilities that might > potentially be used in an attack on the system. In particular, ke...
The book [Cryptography Engineering][1] devotes part of a chapter to this topic. Overwriting sensitive data with zeroes is a good start, but there are lots of other considerations. - If you rely on a language's default object destruction behavior to zero the memory, it's possible for an unexpected error to prematur...
The round 16 on encryption side and round 16 on decryption side of des have no swapping module. why is it like this. can anyone provide any justification? Thanks in advance
Round 16 on encryption side, and round 16 on decryption side of DES have no swapping module. Why is it like this? Can anyone provide any justification? Thanks in advance…
DES - why no swapping block in the last round?
Round 16 on encryption side, and round 16 on decryption side of DES have no swapping module. Why is it like this? Can anyone provide any justification? This is my homework question Thanks in advance…
The requirement is to authenticate 1000s of devices to a server when the devices try to contact the server. The problem I face is that all authentication protocols require some kind of shared secret between the devices and the server. And for devices to know this shared secret, some reliable user has to manually enter ...
Yes, you can have a key of any length of that range (as long as it is an integral number of bytes), but really, why? There is absolutely no reason to. * If the key is uniformly distributed, anything over 256 bits is total overkill and completely pointless. * If the key is not uniformly distributed (maybe it's a ...
A system fell into my neck, where lots of files are splitted into several segments and encoded via RC4. RC4, because client side - slow computer, slow flash arithmetic ops - can only decode big blobs with this simple algo in a reasonable amount of time. I have some reservations regarding the RC4 security, so I'd like t...
Round 16 on the encryption side, and round 16 on the decryption side of DES have no swapping module. Why is it like this? Can anyone provide any justification? This is my homework question.
Why no swapping block in the last round of DES?
I just read the presentation slides of John M. Kesley (from NIST) for his invited talk at CHES 2013 about SHA-3 and learned that NIST is going to standardize Keccak with a possibly modified padding scheme. Ok, so far so good. But what I don't understand is why they thought it was a good idea to limit the possible capac...
Why restricting SHA3 to have only two possible capacities?
Is there a function or system which is time depending in which the effort required to brute force the decryption increases with time? It is easy to break encryption from many years ago because computers are so much faster. Is there a system in which time is a component and as time passes then it gets harder & harder to...
Is there a cryptographic function or system in which it becomes HARDER to break as time passes?
How does a cracker know if they've broken CBC or stream encryption? With hashe cracking one would know because you have the password that you started with to test. But for CBC decryption, you have a 16 bit block (AES), a key, and an IV. With the wrong key one will get random data as output. So how will one know when th...
How does a cracker know if they've broken AES-CBC encryption?
This question is actually not entirely easy to answer. Usually, adding complexity to a cryptographic scheme or implementation, should be avoided, unless the added complexity is necessary in order to meet a specific requirement. The problem with software that is zeroing internal memory, is just that it is hard to come u...
I'm reading [this][1] patent application for an order-preserving tokenization scheme. Near the bottom they describe their token generation algorithm, which basically involves using the first few characters of a string as input to a modified order preserving Ziv-Lempel compression function [described in this patent.][2]...
How secure is this use of Ziv-Lempel encoding?
The keepass password manager uses multiple rounds of AES for its key derivation, as described [here](http://keepass.info/help/base/security.html#secdictprotect). I was somewhat surprised that it wasn't using pbkdf2, bcrypt, or something more common. Essentially, the key derivation is: key = sha256(password) ...
Multiple iterations of AES for key derivation?
I understand modular arithmetic(or at least I think I do!) and I've tried to read and learn about how the Math in RSA works(and I think it went pretty well). I've been reading up on ECC and it looks very interesting and I tried solving a few basic math problems that involve ECC. I understand the basics, now I'm trying ...
In traditional DH one chooses two shared parameters: a large prime "p" and base "g", which is primitive root mod "p". Suppose generation algorithm is broken and "g" generates only a subgroup (group with less elements than number of coprimes to "p"), what could be the possible attack ? what's the complexity ? are there ...
Here is a partial answer: 1. $\mathbb{F}_p$ is the finite field with $p$ elements (it is isomorphic with $\mathbb{Z}/p\mathbb{Z}$. 2. You may think to an elliptic curve as the set of solutions in $\overline{\mathbb{F}_p}$ (the algebraic closure of $\mathbb{F}_p$) of the equation $f(x,y)=0$, where $f(x,y)=y^2-...
I understand modular arithmetic(or at least I think I do!) and I've tried to read and learn about how the Math in RSA works(and I think it went pretty well). I've been reading up on ECC and it looks very interesting and I tried solving a few basic math problems that involve ECC. I understand the basics, now I'm trying ...
Here: http://en.wikipedia.org/wiki/One-time_pad#Authentication it says : `For example, an attacker who knows that the message contains "meet jane and me tomorrow at three thirty pm" at a particular point can replace that content by any other content of exactly the same length, such as "three thirty meeting is cancel...
Can you really insert the text you want in one-time pad?
I know that the HMAC is a message authentication code that uses a cryptographic key in conjunction with a hash function (SHA1 , MD5, etc.). The HMAC output is 160 bits for HMAC-SHA160 and 256 bits for HMAC-SHA256 bits that can be truncated according to the intented application. My quesion is about input... What is t...
When analyzing a repeating-key xor cipher to find the key length, I've read about two key methods (assuming there aren't just repeating chunks of ciphertext for [Kasiski's method][1]), for some assumed key length $l$, checking the Hamming distance of nearby chunks of ciphertext of length $l$, and checking the IoC for c...
Works with modular-arithmetic-based onetime pads as well. If somehow we know this part of a ciphertext: HZIVQ JJGTY GKBSI IWMVV HIYTA YHHDV XLBOK O --decrypts to this message: MEETJ ANEAN DMETO MORRO WATTH REETH IRTYP M Then the key would have to be this: UUDBG IVBSK CXWYT VHUDG KHEZS GCCJ...
Works with modular-arithmetic-based onetime pads as well. If somehow we know this part of a ciphertext: HZIVQ JJGTY GKBSI IWMVV HIYTA YHHDV XLBOK O --decrypts to this message: MEETJ ANEAN DMETO MORRO WATTH REETH IRTYP M Then the key would have to be this: UUDBG IVBSK CXWYT VHUDG KHEZS GCCJ...
Works with modular-arithmetic-based onetime pads as well. If somehow we know this part of a ciphertext: HZIVQ JJGTY GKBSI IWMVV HIYTA YHHDV XLBOK O --decrypts to this message: MEETJ ANEAN DMETO MORRO WATTH REETH IRTYP M Then the key would have to be this: UUDBG IVBSK CXWYT VHUDG KHEZS GCCJ...
Lets say there is a piece of software that uses AES CTR to encrypt different messages using the same key but with slightly different IVs So for example, a 16 byte IV, the 2nd 8 bytes are always the same, but the 1st 8 bytes are random. How insecure is this? I know that you shouldn't use the same IV and key. ...
As the name suggests, CTR mode works by encrypting a counter (that gets incremented with each 16-byte block) to generate a stream of random bits. That bit stream is then XOR'ed with the plaintext to create the ciphertext. The IV provides the initial value for the counter. CTR mode is secure as long as the probabilit...
The answerer has commented that scrypt's memory use is "only a function of r". $\:$ However, he has <br> not addressed my argument that it also depends on N, in one of my comments from over 5 days ago. <br><br><br> I had somehow gotten the impression that scrypt offered a separate memory-factor in addition <br> t...
Let's suppose we are using the exponential ElGamal as a public-key encryption scheme, so that we encrypt $g^m$ instead of $m$, for some generator $g$. Let $x$ be the private key, and $h=g^x$ be the public key. We have two parties, and each one of them has a ciphertext encrypted with the same public key: $(R_1,S_1)=...
When sending a block to be decrypted or encrypted we input the data to decrypt/encrypt and an IV for syncing and to prevent identical outputs for identical inputs. Inside the Rijndael "machine" the input IV is processed and changed through a number of XORS with an end result (logically) different from the input IV. ...
The [universal composability][1] allows one to the analyze security of cryptographic protocols . But it does have some gaps when it comes to analyzing few protocols especially [two party cases when there is no honest majority players][2] Now when it comes to protocols designed for cloud computing, where few parti...
Security of cloud computational protocols in UC Framework?
When sending a block to be decrypted or encrypted, with RijndaelCBC, we input the data to decrypt/encrypt and an IV for syncing and to prevent identical outputs for identical inputs. Inside the RijndaelCBC "machine", (model), the input IV is processed and changed through a number of XORS with an end result (logicall...
When sending a block to be decrypted or encrypted, with RijndaelCBC, we input the data to decrypt/encrypt and an IV for syncing and to prevent identical outputs for identical inputs. *This question is regarding to any loopback mode use of AES chipher block using an IV, but my experience is with CBC. Inside the Ri...
I am studying LogSpace Merkle Tree Traversal algorithm in [this book][1]. In the [pag. 58] I don't understand the Table 1. My question is Why within of the $2^h$ rounds for $NEED_h$ exist only one $TAIL$, if tail in the page 42 is defined than $h$ intermediate nodes in $STACK_h$? [1]: http://www.e-reading-lib.c...
I am studying LogSpace Merkle Tree Traversal algorithm in [this book][1]. In the [pag. 58] I don't understand the Table 1. My question is Why within of the $2^h$ rounds for $NEED_h$ exist only one $TAIL$, if tail in the page 42 is defined than intermediate nodes in $STACK_h$? [1]: http://www.e-reading-lib.com/...
I assume you mean that the CBC-mode encryption and decryption process would 'update' the "output IV" will be identical to the most recent ciphertext block. This isn't obvious from your question; for example, the diagrams you show don't show any "output IV" being generated at all. Now, for your specific questions: ...
I am performing a research in vulnerable RSA moduli which are composed of primes generated with poor entropy. Having a list of these primes I searched for variable sized repeated patterns among them and I noticed the following: `DD93536E58A60B0F56BF95FAEDC7CA42A9C9809A`0AAE2FC971C3D9963587ABCEAF2BAB479A68DDC9EFF0E9...
How can i take advantage of repeated patterns in non random RSA prime factors?
In some protocols, a key is derived from a hash of many parameters (K=H(param1,param2,param3)) Is there a hash function that takes many parameters as input ? Or we can simply use a function like SHA-1 by concatenating these parameters as input ?
Here: http://en.wikipedia.org/wiki/One-time_pad#Authentication it says : > For example, an attacker who knows that the message contains "meet jane and me tomorrow at three thirty pm" at a particular point can replace that content by any other content of exactly the same length, such as "three thirty meeting is cance...
I am researching vulnerable RSA moduli which are composed of primes generated with poor entropy. Having a list of these primes I searched for variable sized repeated patterns among them and I noticed the following: `DD93536E58A60B0F56BF95FAEDC7CA42A9C9809A`0AAE2FC971C3D9963587ABCEAF2BAB479A68DDC9EFF0E98F0F5FD488A9D...
How can I take advantage of repeated patterns in non random RSA prime factors?
How to hash a list of multiple items?
Using the same key for encryption and MAC is [generally bad style](http://security.stackexchange.com/questions/37880/why-cant-i-use-the-same-key-for-encryption-and-mac), but may be secure in your implementation. FMS isn't relevant for file segment decode because you don't reuse the same key. [FMS isn't the only att...
According to PKCS#11 v2.20, "`C_GetMechanismInfo` obtains information about a particular mechanism **possibly supported** by a token." Does that mean `C_GetMechanismInfo()` can return `CKR_OK` on a **temporarily disabled** mechanism? For example, if `C_GetMechanismList()` does not return `CKM_MD5` in the result then is...
PKCS#11: Can C_GetMechanismInfo() return CKR_OK on a disabled mechanism?
According to [PKCS#11 v2.20][pkcs11], "`C_GetMechanismInfo` obtains information about a particular mechanism **possibly supported** by a token." Does that mean `C_GetMechanismInfo()` can return `CKR_OK` on a **temporarily disabled** mechanism? For example, if `C_GetMechanismList()` does not return `CKM_MD5` in the resu...
In regards to meet in the middle type attacks, I have been considering the amount of operations in order to successfully find a key given two sets of plaintext / ciphertext pairs. All of the sources I have checked have stated that the maximum number of trials that are needed is 2^(n+1), however this does not seem to ta...
Let's suppose we are using the exponential ElGamal as a public-key encryption scheme, so that we encrypt $g^m$ instead of $m$, for some generator $g$. Let $x$ be the private key, and $h=g^x$ be the public key. We have two parties, and each one of them has a ciphertext encrypted with the same public key: $(R_1,S_1)=...
What is the ASN.1 OID associated to [bcrypt](http://www.usenix.org/events/usenix99/provos/provos_html/node1.html) (the key derivation scheme)? For instance, PBKDF2 has `1.2.840.113549.1.5.12` and it is therefore possible to store a private key in a PKCS#8 structure, encrypted with a password. Is that possible with b...
Dave here, with a plan for storing secrets. Threat model: ------------- * Database and keyfile may (will?) be stored on un-trusted servers. * Database contains many valuable secrets (passwords), encrypted by key stored in keyfile. * Source code is public. * Keyfile and database SHOULD never be stored on th...
How terribly flawed is this design for key storage?
**Preamble** Before I ask this question, please accept that I fully understand that 'rolling your own' is never a good idea, and that I am a relative n00b. The only reason I am doing this the way I am is that there are major constraints - I have no high-level crypto libraries (like, say, NaCl) available, and this wi...
The purpose of using bcrypt and other slow PBKDFs, is to to slow down attacks on the password, *if* the attacker should get hold of the cipher text, just enough to give all users an opportunity to change their passwords. However, from your question it seems as if you intend to store the cipher text on an untrusted ...
In regards to meet in the middle type attacks, I have been considering the amount of operations in order to successfully find a key given two sets of plaintext / ciphertext pairs. All of the sources I have checked have stated that the maximum number of trials that are needed is $2^{n+1}$, however this does not seem to ...
Why is the complexity of RSA-1024 80 bit and not 86.76611925028119 bit? > Here is the complexity for the GNFS (pulled from the linked Wikipedia > article): > > $$\exp\left( \left(\sqrt[3]{\frac{64}{9}} + o(1)\right)(\ln > n)^{\frac{1}{3}}(\ln \ln n)^{\frac{2}{3}}\right)$$ > > where $n$ is a number to factor....
Why is the complexity of RSA-1024 80 bit and not 86 bit?
Why is the complexity of RSA-1024 80 bit and not 86.76611925028119 bit? > Here is the complexity for the GNFS (pulled from the linked Wikipedia > article): > > $$\exp\left( \left(\sqrt[3]{\frac{64}{9}} + o(1)\right)(\ln > n)^{\frac{1}{3}}(\ln \ln n)^{\frac{2}{3}}\right)$$ > > where $n$ is a number to factor....
Why is the complexity of RSA-1024 80 bit and not 86.76611925028119 bit? > Here is the complexity for the GNFS (pulled from the linked Wikipedia > article): > > $$\exp\left( \left(\sqrt[3]{\frac{64}{9}} + o(1)\right)(\ln > n)^{\frac{1}{3}}(\ln \ln n)^{\frac{2}{3}}\right)$$ > > where $n$ is a number to factor....
Well, one assumption you appear to be making is that, with 2DES, there will be approximately $2^{56}$ possible key matches. Actually, there are an expected $2^{48}$ possible key matches; here's why: Let us assume we're running the meet-in-the-middle attack on 2DES, and consider an arbitrary incorrect encryption tri...
Dave here, with a plan for storing secrets. Threat model: ------------- * Database and keyfile may (will?) be stored on un-trusted servers. * Database contains many valuable secrets (passwords), encrypted by key stored in keyfile. * Source code is public. * Keyfile and database SHOULD never be stored on th...
Presumably, it's because they rounded it down to a nice round number of bits. Nobody's going to use an 86.76611925028119 bit key in practice, but an 80-bit key is plausible. Besides, the 86.whatever bit symmetric key length is only approximate, anyway: even using the GNFS, implementation details could easily swing ...
Why is the complexity of RSA-1024 80 bit and not 86.76611925028119 bit? > Here is the complexity for the GNFS (pulled from the linked Wikipedia > article): > > $$\exp\left( \left(\sqrt[3]{\frac{64}{9}} + o(1)\right)(\ln n)^{\frac{1}{3}}(\ln \ln n)^{\frac{2}{3}}\right)$$ > > where $n$ is a number to factor. Ev...
I'll expand on the comment I left on my answer. The purpose of Part 2 of [NIST SP 800-57](http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf) is to "[provide] guidance on policy and security planning requirements for U.S. government agencies". Keeping that in mind, the table on page 64...
Dave here, with a plan for storing secrets. **Threat model:** * Database and keyfile may (will?) be stored on un-trusted servers. * Database contains many valuable secrets (passwords), encrypted by key stored in keyfile. * Source code is public. * Keyfile and database SHOULD never be stored on the same se...
Dave here, with a plan for storing secrets. **Threat model:** * Database and keyfile may (will?) be stored on un-trusted servers. * Database contains many valuable secrets (passwords), encrypted by key stored in keyfile. * Source code is public. * Keyfile and database SHOULD never be stored on the same se...
Dave here, with a plan for storing secrets. **Threat model:** * Database and keyfile may (will?) be stored on un-trusted servers. * Database contains many valuable secrets (passwords), encrypted by key stored in keyfile. * Source code is public. * Keyfile and database SHOULD never be stored on the same se...
(Originally posted to SOF, but I got no answers) I am designing a small application for use inside my company. My application needs to connect to a third party website on behalf of my application user. I would like to safely store the user's credentials for the third party site in my database. Obviously, storing the...
what is the meaning of trapdoor and how convert the word into trapdoor in cryptography ? Is hash function consider trapdoor function? please explain with example .Is trapdoor function type of encryption?
what is the meaning of trapdoor and how convert the word into trapdoor in cryptography ? Is hash function consider trapdoor function? please explain with example .Is trapdoor function type of encryption?and what is the result of trapdoor function numeric or string result?and what is trapdoor itself mean is it mean priv...
Theorem 1 of <http://www.researchgate.net/publication/221010790_Implicit_Factoring_with_Shared_Most_Significant_and_Middle_Bits?ev=pub_cit_inc>["Implicit Factoring with Shared Most Significant and Middle_Bits"] by Jean-Charles Faugère, Raphaël Marinier, Guénaël Renault from 2010 deals with factoring products of two pri...