instruction
stringlengths
15
30k
A symmetric cipher design contest was started in Ukraine around 2006, and this cipher (in Ukrainian and Russian: **Мухомор**) was there. For specifications, look for "Applied Radioelectronics" journal "Прикладная радиоэлектроника", 2007, No 2. - http://anpre.org.ua/?q=pre_2007_2 - http://dspace.nbuv.gov.ua/bitst...
I was looking into the predictions by some researchers that RSA and Diffie-Hellman may not be secure in the next few years due to advances in math and being able to calculate the discrete logarithm problem in new ways no longer making them "impossible" to solve backwards ([Math Advances Raise the Prospect of an Interne...
RSA & DH at risk due to math advaces, will this eventuall effect elliptic curve too?
Consider there is a protocol in real world calling a random oracle $\mathcal{H}$ for a priavte input $k$. Then in the ideal world, after the calling of $r \leftarrow \mathcal{H}(k)$ by a honest party, can the simulator extract $k$ from $r$, if the behavior of $\mathcal{H}$ is as follows: - When $k$ is new, record $...
May I use Random Oracle for Inversed Look-up?
I need to implement cryptographic operations starting with the curve NISTP256. I have been told to implement it using Montgomery method. I read a pfd from <http://saluc.engr.uconn.edu/refs/sidechannel/okeya00elliptic.pdf>. It states that the order of the curve must be divisible by 4. But the curve's order is not a mult...
Cryptographic operations for NISTP256 can be impolemented using montgomery method?
RSA & DH at risk due to math advances, will this eventually affect elliptic curves too?
In his blog [Schneier discusses][1] that there is a new related key attack on 10 rounds of AES-256 "Another attack can break a 10 round version of AES-256 in 245 time, but it uses a stronger type of related subkey attack". My question is how many more rounds would they have to use to keep this security margin on AES...
More rounds after AES related key attack?
Is the RC4 keystream random or not?
I have cause to use the PRNG half of RC4, but am seriously confused as to the randomness of its output. (Only the PRNG half.) On the one hand, there is a large body of literature finding ever greater biases in RC4's keystream. It appears that both weak and strong distinguishers can identify RC4 from a truly random...
Why does the time complexity of RSA encryption and decryption depend on the size of the modulus?
Consider there is a protocol in real world, which uses a random oracle $\mathcal{H}$. In the ideal world, after the calling of $\mathcal{H}$ by some parties, intuitively I want the simulator gets some information from $\mathcal{H}$. As Mikero pointed out in [this question][1], the adversary may not call the oracle a...
How to force an adversary to call a certain oracle?
Cryptographic operations for NISTP256 can be implemented using montgomery method?
How do a user register his verifier at host in SRP(Secure Remote Password) protocol?
Consider there is a protocol in real world, which uses a random oracle $\mathcal{H}$. In the ideal world, after the calling of $\mathcal{H}$ by some parties, intuitively I want the simulator gets some information from $\mathcal{H}$. As Mikero pointed out in [this question][1], the adversary may not call the oracle a...
If we wished to, is there a comprehensive alternative to RSA? I say comprehensive as I wonder if there is one which does both encryption and digital signature like RSA? If not, simply what alternatives are there?
Are there comprehensive alternatives to RSA?
I'm wondering, if something like block cipher with big block size is memory-hard function? All memory-hard key derivation functions I've seen look more complex than that, which made me question my understanding of memory-hardness. The following function looks memory-hard (memory tradeoff looks expensive) to me: ...
I am studying Pseudorandom Number Generators and when reading the discussion on One-Way Functions and Hardcore Predicates, I came upon this equation. [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/DK6Xf.png I understand that the b(x,r) is the hardcore predicate (either a 1 or 0) bu...
What Does This Symbol Mean? (Hardcore Predicates for One-Way Functions)
I am studying Pseudorandom Number Generators and when reading the discussion on One-Way Functions and Hardcore Predicates, I came upon this equation. $$b(x,r)=\displaystyle \bigoplus_jx_jr_j$$ I understand that the $b(x,r)$ is the hardcore predicate (either a $1$ or $0$) but I do not understand the operation bei...
We are having Pedersen commitment C to the secret value x, and Fujisake commitment C' to the secret value x, how we can make the zero-knowledge proof of equality for x value in the commitments?
How to proof secret value in Pedersen commitment is equal to secret value in Fujisaki commitment?
I'm wondering about using human input as an entropy generator. We all know humans are terrible at making up random numbers or keys or passwords. But what if we let a user 'randomly' type in some garbage. Just smashing the keyboard, so to speak. How much randomness does that give, or rather, **how much bits of entro...
How much entropy is generated by 'random' human keystrokes?
It's known that for a given subkey, the F-function of the DES is not injective (see http://crypto.stackexchange.com/questions/21088/is-the-des-f-function-injective-for-a-given-subkey). I am interested in efficiently finding collisions for this function, i.e. for a given subkey $k$, I want to find two different inputs $...
We are using gpg2 and base64 commands with 2048R algorithm. Input: encrypted 36 bytes of input text data with fixed length Current problem: if I run `gpg` command continuously, sometimes the encrypted data is 387 bytes instead of 389 bytes. Why?
Why does GPG ciphertext length differ with fixed plaintext length?
I want to write a sniffer that can read AES-GCM communication using the gcrypt lib I can see in the manual that for encryption there is an additional 2 methods (for AEAD) but what about decryption ? what need to do for decryption for AEAD ciphers ? Thanks Lior
Simple question: in order to reduce such huge exponents in modular arithmetic, is repeated squaring used in RSA or is there a better way to implement it?
[![enter preformatted text here][1]][1] [1]: https://i.stack.imgur.com/kyqKO.png I asked the same question before. But an unregistered user i haven't any privilege to comment. So i am repeating my same question. I am trying to implement an IEEE Paper In Cryptography. I read many reference regarding an RSA ke...
[![enter preformatted text here][1]][1] [1]: https://i.stack.imgur.com/kyqKO.png I asked the same question before. But an unregistered user i haven't any privilege to comment. So i am repeating my same question. I am trying to implement an IEEE Paper In Cryptography. I read many reference regarding an RSA ke...
I need a continuous (infinite) strong random generator, but I've only got limited entropy as seed. I know there's already a contradiction there, but I'm looking for a practical approach. Suppose I have a piece of 1024 bit strong random entropy (a one time constant for this particular stream), and a cryptographically...
Continuous stream of strong randomness from limited entropy?
I am currently doing the [Matasano Crypto Challenge][1] to learn a bit about cryptography. In that specific challenge one had to implement AES in CBC mode. I did that and verified that encryption and decryption are working using these [test vectors][2]. I can't manage to decrypt the message given in the challenge thoug...
[libsodium has a method][1] for comparing two byte sequences in constant time. Is the idea here to simply avoid early-out if a difference in the data is detected? When I first heard of such a thing I imagined an operating-system sleep operation to round-up the runtime of the algorithm to some threshold, but this ...
How does constant-time comparison work?
Algebraic Eraser&trade; is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group. An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t...
I am going through Steven Kinney's book; "Trusted Platform Module Basics", and pp 90 - 92 discuss how to calculate the authorization digest. He talks about 1H1, 2H1, 3H1, and 4H1 fields which I do not even see in the corresponding diagram. Can anyone explain this process, or point me to a document which does? If you ar...
Algebraic Eraser&trade; is a relatively new asymmetric key agreement protocol (also designated the Colored [Burau][1] Key Agreement Protocol), based on a simultaneous conjugacy search problem in a braid group. An initial exposition is: Iris Anshel, Michael Anshel, Dorian Goldfeld, Stephane Lemieux, _Key agreement, t...
We have Pedersen commitment C to the secret value x, and Fujisake commitment C' to the secret value x. How can we make a zero-knowledge proof of equality for x value in the commitments?
How to prove secret value in Pedersen commitment is equal to secret value in Fujisaki commitment?
Under RSA protocol I was wondering how a message sent could be verified under the following scenario Alice has a private (encryption key) and public key (decryption key) If Bob sends Alice cipher-text but does not know the plain-text message he sent to Alice Can Bob send Alice a second message in plain-text ...
Suppose we have classic RSA scheme. Let $n=pq$, $e$ public, $d$ secret. Then message(M), not empty(not 0), is encrypted by choosing random $r$ and computing $A=(r^e)^e$ and $B=(Mr)^e$ $(A,B)$ is then cipher text. Why is this not IND-CPA secure? Have trouble grasping IND-CPA concept.. well concept is clear, but...
I have this large number: 1728098743723095094470726818328193358068864405124007684733613106475812450278961107574624070107782941006379 which is the multiplication of two unknown large prime numbers. I try to factorize it with the "Yafu" tool, but i get an error of "time exceeded. How can I factorize it? How many...
How can I factorize a 106 digits number in two prime factors?
Let's say I need to verify a digital signature and the public key is stored in untrusted storage which I need to fetch before I verify the digital signature. However, I can store the cryptographic hash of the public key in trusted storage and I decide to use the hash to verify the integrity of the public key. Now say I...
> Can I compute the only hash of the modulus for integrity? Well, if we allow the attacker to modify the value of $e$ you use (because it's in untrusted storage and you don't verify it), how can he exploit that? Well, the most obvious approach for him would be to modify $e$ to be 1 - that makes generating forgeries...
> Can I compute the only hash of the modulus for integrity? Well, if we allow the attacker to modify the value of $e$ you use (because it's in untrusted storage and you don't verify it), how can he exploit that? Well, the most obvious approach for him would be to modify $e$ to be 1 - that makes generating forgeries...
> Under RSA protocol I was wondering how a message sent could be verified under the following scenario RSA is not a protocol, it's a crypto system. It contains several algorithms that utilize the same trap door function but different encryption and signature generation methods. > Can Bob send Alice a second messa...
> Can I compute the only hash of the modulus for integrity? Well, if we allow the attacker to modify the value of $e$ you use (because it's in untrusted storage and you don't verify it), how can he exploit that? Well, the most obvious approach for him would be to modify $e$ to be the value 1; that would make genera...
I have cause to use the PRNG half of RC4, but am seriously confused as to the randomness of its output. (Only the PRNG half.) On the one hand, there is a large body of literature finding ever greater biases in RC4's keystream. It appears that both weak and strong distinguishers can identify RC4 from a truly random...
The RC4 cipher possibly exhibits low level bias in it's long run PRNG keystream. I'm specifically excluding short term bias attacks which I'm defining as outputs < 1024 bytes. Are there any real world attacks that exploit this feature?
Are there any long term RC4 bias based exploits?
This may not focus directly on AES and is somewhat tangential, but currently there are debates as to the efficacy of large complex passwords, especially multiple ones. People write them down. This is compounded by automatic password expiry and password recycling rules. Most IT guys have huge lists of passwords w...
The answer is in the source, file [sshrsag.c, line 9][1]: > `#define RSA_EXPONENT 37 /* we like this prime */` This value $e=37$ matches the conditions for a reasonable fixed RSA public exponent: - $e$ is odd, - $e$ is at least $3$, - $e$ is reasonably small. The later condition - is good for s...
I am currently doing the [Matasano Crypto Challenge][1] to learn a bit about cryptography. In that specific challenge one had to implement AES in CBC mode. I did that and verified that encryption and decryption are working using these [test vectors][2]. I can't manage to decrypt the message given in the challenge thoug...
Trying to settle a discussion at work. We are mostly concerned with pre-image attacks. Suppose we have a secure hash function `H` and some message `M` we want to hash. The message has length `ML`. For the message we provide the digest `D` and the length of data digested `DL`. With regards to preimage-attacks, is ...
I am a newbie in cryptography. I want to use ED25519 signature scheme in my application which requires frequent sharing of secret data between two entities in public domain. I know that Schnorr signature scheme has a key authentication center (KAC) which decides and shares common parameters to be used by signer and ve...
The idea of [crypto_box API in NaCl library][1] is to shield the programmer away from the technical details and provide easy to use functions for encrypting and encrypting messages. Given what I've just wrote, I do not understand why the idea of *nonce* is exposed in this API. Explaining what nonce is and how to use...
Trying to settle a discussion at work. We are mostly concerned with pre-image resistance. Suppose we have a secure hash function `H` and some message `M` we want to hash. The message has length `ML`. For the message we provide the digest `D` and the length of data digested `DL`. With regards to preimage-resistanc...
Trying to settle a discussion at work. We are mostly concerned with pre-image resistance. Suppose we have a secure hash function $H$ and some message $M$ we want to hash. The message has length $M_L$. For the message we provide the digest $D$ and the length of data digested $D_L$. With regards to preimage-resista...
I want to use CBC MAC. First I hope to find some implementation of block cipher which I will use in CBC mode, which I understand is CBC MAC. But I have two questions: 1) If the length of the message to be authenticated is not multiple of block cipher block length, what shall I do? 2) Do I need to use session keys...
First the obvious: checking $M_L=D_L$: - is unnecessary from a security standpoint **if** $H$ really is secure, by definition of that; but who knows what's really secure? - can't harm pre-image resistance (first or/and second), nor collision-resistance; - can greatly increase speed, if the hash is computed only af...
First the obvious; checking $M_L=D_L$: - is unnecessary from a security standpoint ***IF*** $H$ really is secure, by definition of that; but who knows what's really secure? - can't harm preimage resistance (first or/and second), nor collision resistance; - can greatly increase speed, if the hash is computed only a...
First the obvious; checking $M_L=D_L$: - is unnecessary from a security standpoint ***IF*** $H$ really is secure, by definition of that; but who knows what's really secure? - can't harm preimage resistance (first or/and second), nor collision resistance; - can greatly increase speed, if the hash is computed only a...
First the obvious; checking $M_L=D_L$: - is unnecessary from a security standpoint ***IF*** $H$ really is secure, by definition of that; but who knows what's really secure? - can't harm preimage resistance (first or/and second), nor collision resistance; - can greatly increase speed, if the hash is computed only a...
First the obvious; checking $M_L=D_L$: - is unnecessary from a security standpoint ***IF*** $H$ really is secure, by definition of that; but who knows what's really secure? - can't harm preimage resistance (first or/and second), nor collision resistance; - can greatly increase speed, if the hash is computed only a...
Trying to settle a discussion at work. We are mostly concerned with pre-image resistance. Suppose we have a secure hash function $H$ and some message $M$ we want to hash. The message has length $M_L$. For the message we provide the digest $D$ and the length of data digested $D_L$. With regards to preimage-resista...
How does the whole achitecture between the **certificate authority** (e.g VeriSign) and its **clients** (e.g foo.com) work. How does my browser know that foo.com hasn't created its own certificate, wrote "VeriSign" as issuer, signed it with its own private key and wrote the corresponding public key into the certific...
How does the certificate trust model work in detail?
Is there any algorithm capable of encrypt securely (symmetric or asymmetric) N numeric digits in a numeric message of M digits (N < M)? I am especially interested in a specific case in which N = 10 and M = N + 3. I tried the most famous algorithms, like DES and AES, but they did not get success. Does anyone know a way ...
How does the whole achitecture between the **certificate authority** (e.g VeriSign) and its **clients** (e.g foo.com) work. How does my browser know that foo.com hasn't created its own certificate, wrote "VeriSign" as issuer, signed it with its own private key and wrote the corresponding public key into the certific...
How does the whole achitecture between the **certificate authority** (e.g VeriSign) and its **clients** (e.g foo.com) work. How does my browser know that foo.com hasn't created its own certificate, wrote "VeriSign" as issuer, signed it with its own private key and wrote the corresponding public key into the certific...
Is there any algorithm capable of encrypt securely (symmetric or asymmetric) N numeric digits in a numeric message of M digits (N < M)? I am especially interested in a specific case in which N = 10 and M = N + 3. I tried the most famous algorithms, like DES and AES, but they did not get success. Does anyone know a way ...
One way of doing this is using a [Format Preserving Encryption][1] method. This is a symmetric encryption method that is designed to convert (potentially) small messages into encrypted messages of exactly the same size. For example, it may take strings of 43 bits, and encrypt them into strings of 43 bits. Here i...
Looking at the RFC for PGP email/asynchronous chat with PFS here https://tools.ietf.org/html/draft-brown-pgp-pfs-03 can anyone tell me why the following scheme is no good? Alice and Bob retrieve each others long-term public keys. When Alice sends the first email to Bob, she encrypts her message with Bob's long-term ...
Is there any algorithm capable of encrypt securely (symmetric) N numeric digits in a numeric message of M digits (N < M)? I am especially interested in a specific case in which N = 10 and M = N + 3. I tried the most famous algorithms, like DES and AES, but they did not get success. Does anyone know a way to encrypt mes...
I'm wondering, if something like block cipher with big block size is memory-hard function? All memory-hard key derivation functions I've seen look more complex than that, which made me question my understanding of memory-hardness. The following function looks memory-hard (memory tradeoff looks expensive) to me: ...
How to verify CA certificate from Yubico with openssl?
im looking at wiki at the moment as how to use oeap padding and it appears, help me out if im wrong as G(r) - expands r to the size of the padded message, I am then limited by the size of my hash function as say a SHA-256 hash function would expand to only 256 bits, but what if I had a 2048 bit modulus? I'm unsure if...
Does OEAP padding limit the size of my modulous to the size fo the hash function?
I came upon an idea the other day that I had some questions about. I am not a security professional but I do study with an amateur interest and have not heard of this particular idea before. There were a few similar questions here, but : - http://crypto.stackexchange.com/questions/10140/using-one-way-hash-fu...
In [this paper](https://crypto.stanford.edu/~dabo/papers/RSA-survey.pdf), the author writes: > Now $k\phi(N) = ed - 1 < ed$. Since $e < \phi(N)$, we see that $k <d < \frac{1}{3}N^{\frac{1}{4}}$. Hence, we obtain: <br> <br> $\mid \frac{e}{N} - \frac{k}{d} \mid \leq \frac{1}{dN^{\frac{1}{4}}} < \frac{1}{2d^2}$ ...
I came upon an idea the other day that I had some questions about. I am not a security professional but I do study with an amateur interest and have not heard of this particular idea before. There were a few similar questions here, but : - http://crypto.stackexchange.com/questions/10140/using-one-way-hash-fu...
Suppose we have a group $G$ cyclic of order $pq$ , where $p,q$ are primes. Let $g$ be a generator of $G$ and $t\in \mathbb{Z}_{pq}$. Having $g$ and $g^t$, it seems to be very hard to find $g^{t^{-1}}$, supposing discrete logarithm problem (DLP) is hard. My question is : is this really hard? In order prime , let say...
[HARD PROBLEM?]
In [this paper](https://crypto.stanford.edu/~dabo/papers/RSA-survey.pdf), the author writes: > Now $k\phi(N) = ed - 1 < ed$. Since $e < \phi(N)$, we see that $k <d < \frac{1}{3}N^{\frac{1}{4}}$. Hence, we obtain: <br> <br> $\mid \frac{e}{N} - \frac{k}{d} \mid \leq \frac{1}{dN^{\frac{1}{4}}} < \frac{1}{2d^2}$ ...
I'm new to the OAEP scheme. I learn it from the Wikipedia page. [Link][1] The page does not explain a proper setup for of the system. So I'm not sure if the output of the padding scheme which contains two components X and Y `(X||Y)` is going to be the input of the RSA encryption? Or is there something that I'm...
Imagine a server with an authentication scheme that utilizes an element of randomness in new sessions (i.e. one that uses the secure remote password protocol). At the end of a successful authentication, when session keys are being derived (via hkdf), suppose a "history key" was derived as well. In the first int...
While bruteforcing to a ciphertext, I've found some multiple keys for decryption. <pre> mode is DES(ECB, PKCS5 padding) ciphertext is 'TXcmk8KwIPxTHR45zAIGJPEFYj6dsgVOGseZnMcedCOhl/Qp5a8Qig==' keys are used :{ !*}, { +}, { *} </pre> keys packed by brackets {}. and whitespaces included. The ...
Does DES had multiple key for Enc/Dec?
[1]: https://i.stack.imgur.com/kyqKO.png I asked the same question before. But an unregistered user i haven't any privilege to comment. So i am repeating my same question. I am trying to implement an IEEE Paper In Cryptography. I read many reference regarding an RSA key generation. But i am confused with ab...
I'm wondering, if something like block cipher with big block size is memory-hard function? All memory-hard key derivation functions I've seen look more complex than that, which made me question my understanding of memory-hardness. The following function looks memory-hard (memory tradeoff looks expensive) to me: ...
I am trying to read a paper in cryptography. In key generation phase, paper give a definition for bilinear like G and Gt be two cyclic groups of prime order p $e: G * G \to G_t$. be a map with the following properties: [![enter image description here][1]][1] and in one place i found a definition like [![enter ...
Given $g,g^t$ in a cyclic group of order $pq$, is it hard to compute $g^{t^{-1}}$?
I have a Java card, which I like to learn more about by installing my own TPM on it. One, which I can kind of "kick the tires", install root keys, send different command to, and ... without fear of breaking anything or making it unresponsive. Does anyone know of a TPM implementation I can put on this card? when I put t...