# All Questions

289 views

### Compare two approaches for cracking RSA key

I came across these questions while studying for a crypto course, does anyone have any ideas on how to answer these? (a) Random prime numbers of size 1536 bits are chosen to generate an RSA modulus ...
102 views

### Is it just as difficult to find a desired output in a hash digest, for MSB vs LSB?

This question comes to mind after seeing "custom" Bitcoin addresses with some special string at the beginning of the address. They are generated in the same way Bitcoins are "mined", continually ...
228 views

### Elliptic curve parameters

What's the meaning of 160 bit Curve in Elliptic curve ? or 192 or 224 or 256 and etc. And What is the standard for selecting this number of bit ? why they don't say 100 bit curve?
404 views

### How can I do minus on plaintexts in the Paillier cryptosystem?

We have $E(a)$, $E(b)$ encrypted under the same Paillier key. As we all know, we can get $E(a+b)$ by calculating $E(a)*E(b)$. But can we get $E(a-b)$, by calculating $E(a)/E(b)$? I tried to ...
1k views

### Static DH/Static ECDH certificate using OpenSSL

I've been searching for some time and have found no way to create a working certificate and private key pair with a DH or ECDH public key using OpenSSL. Once I do this, I'd like to sign it with an RSA ...
77 views

### Hardness proof?

I am little curious about how do we calculate hardness proof of any cryptography algorithm? Also where can I find hardness proof for AES and AES-CBC ?
175 views

### INT_32_BE in PBKDF2

Trying to understand PBKDF2 in detail. It is clear that the password and the salt is given to the PRF (which is HMAC-SHA-1 in the specification). But what is the role of the INT_32_BE(i)? What does it ...
115 views

### Question about second preimage resistance of hash function combiner

Let $\Pi=(Gen_1,H_1)$ and $\Pi=(Gen_2,H_2)$ be two hash functions. Define $(Gen, H)$ so that $Gen$ runs $Gen_1$ and $Gen_2$ obtaining $s_1$ and $s_2$ respectively. Then let ...
424 views

### what is the difference between IBE and ABE schemes

Can somebody explain in simple words. real life example light help and limitations of these schemes etc.
366 views

### Modes of operation for Public Key Encryption schemes

Symmetric key encryption schemes have well defined modes of operations for achieving deterministic (ECB) or Randomized (CBC, OFB, CTR ) etc. and other applications of the same. But are they defined ...
193 views

### How hard to break a cipher if it has a different key for each word?

Recently I watched the movie 'The Prestige' again but this time the cipher diary impressed me very well. I like to create my own cipher for my diary because I have some time to kill everyday after ...
72 views

### where to keep the AES keystream?

I am trying to implement an AES encryption on my messages in my app and I want to have a different keystream for each "message group". Therefore, currently I am holding the keystreams in the database ...
926 views

### Known plaintext attack on ElGamal encryption

Assume that Alice uses Bob’s ElGamal public key ( = 2, Yb = 8) to send two messages $M = 17$ and $M' = 37$ using the same random integer $k = 9$. Eve intercepts the ciphertext and somehow she finds ...
154 views

### Which algorithm do you recommend for practical use to generate unique passwords for each website?

So, in my imagination there is this simple algorithm with only one master password, let's say a prime number 'p', which I have to remember. Using only the address of the website and p, the algorithm ...
3k views

### In public key cryptography, how many keys are required for secure communication between n parties?

In public key cryptography, how many keys are required for secure communication between n parties? In my view the answer should be $n^2$. Reason: There are ‘$n$’ Parties. Every Party has One (1) ...
323 views

### Deriving 2 keys using HKDF

I have an encryption scheme that uses a 256-bit master key, from which 2 separate keys (one for AES-256-CTR encryption and one for a HMAC-SHA256) are derived using HKDF. However, I'm not sure exactly ...
261 views

### Is 256 a reasonable length for a Diffie-Hellman safe prime?

There's a program that uses the following OpenSSL function... DH_generate_parameters(256, 5, NULL, NULL) ...to create DH parameters which are later used for ...
326 views

### How can I find the multiplicative inverse in the first transformation of the SubBytes() transformation in AES?

In FIPS-197 §5.1.1 , it says the first transformation in the SubBytes() transformation is: Take the multiplicative inverse in the finite field $\text{GF}(2^8)$ described in Sec. 4.2; the ...
181 views

### Public and private key lengths

I am generating RSA Public and Private keys with node.js instead of reading them from pem/crt files as I can hide them inside a private object using this module https://www.npmjs.org/package/private ...
108 views

### How can a digital signature algorithm incorporate a random data if it is to be authenticated on a separate system

I am trying to understand how RSA digital signatures can incorporate any data from a PRNG into the final signature. Does this mean that separate implementations might fail to verify each others ...
151 views

255 views

### Number of different substitution alphabet ciphers possible with given conditions?

If you consider a 26 letter alphabet, and a cipher where 24 of the letters are sent to themselves, and only 2 letters switch, how many different substitution alphabet ciphers are there, and what ...
230 views

### ElGamal digital signature. why mod p-1 in delta?

Im trying to figure out why $\delta$ in the signature part of ElGamal has mod $p-1$ when $\gamma$ has mod $p$? $\gamma = \alpha^k \mod p$ $\delta = (x-a\gamma)k^{-1} \mod p-1$
423 views

### About the Rijndael/AES sbox polynomial (subBytes)

I've recently read a question about the irreducible polynomial behind the subBytes() operation in the Rijndael that has awakened and old curiosity I have: Why $\,m(x)$ was chosen as ...
247 views

### reverse an identicon to its source string

Identicons are used to create unique images based on IP address or strings. Lots of programs are available to generate identicons based on an input string. My ...
215 views

### Are the RFC3526 MODP groups Schnorr groups?

I was wondering if a group like the 1536-bit MODP Group from RFC 3526 was a Schnorr group? A Schnorr group must apparently have: $p$ and $q$ being primes $p = q\cdot r+1$ $1 < h < p$ ...
105 views

Pls I need explanation on How i can design a Cryptography that use multiple passwords or passphrase to open a safe(Lock). For example, if i need five people to unlock a secured device whereby all the ...
327 views

### Generalize the Merkle–Damgård construction for any compression function

I am trying to figure out this question: Generalize the Merkle–Damgård construction for any compression func­tion that compresses by at least one bit . You should refer to a general input ...
100 views

### Definition of one-way functions: randomly-chosen point vs every point

Notation: $\Sigma^k$ is the set of $k$-strings on the alphabet $\Sigma$; $\Sigma^\ast$ is the set of all finite dimensional strings on the alphabet $\Sigma$. In the context of computer-science a ...
98 views

### Is a tweakable block cipher still considered deterministic in nature?

"a block cipher is a deterministic algorithm operating on fixed-length groups of bits, called blocks, with an unvarying transformation that is specified by a symmetric key. - Wikipedia " But with a ...
168 views

### XORing a header with SHA512-hash - secure?

I am writing a application that encrypts text several times and stores the result. The result looks like complete random bytes, therefore I add some random bytes at the end. To let the program know ...
82 views

### MAC security and adversaries with memory

The usual definition of MAC security is (roughly) that there is no "efficient" adversary that has non-negligible advantage in the "MAC game" where the MAC game is as follows: the challenger chooses a ...
89 views

### Exchanging Keyspace and Message space in PRF

Suppose there is a secure PRF $F: K \times X \to Y$. Then is $F': X \times K \to Y$, defined by $F'(x,k):=F(k,x)$, a secure PRF? In my opinion it should be because exchanging the keyspace with ...
410 views

### AES-256 Shift-Rows Offsets

I am currently trying to implement a AES-256 cipher according to this sepcificaciton: http://techheap.packetizer.com/cryptography/encryption/spec.v36.pdf As well as on Wikipedia and in the document ...
47 views

Assuming the alert protocol is encrypted AFTER a session has been established and the structure below, how does the client know whether to expect encrypted data or not? ...
82 views

### How to invalidate decryption key in multi user model?

I want to develop an application that will allow a user to create a public/private key pair, and encrypt it symmetrically with a key such that once they enter their password, they will be able to ...
316 views

### Rock-paper-scissors over network, how to protect from cheating server?

I'm trying to design cryptographic protocol to play Rock-Paper-Scissors with two parties, neither trusting each other, nor trusting server they use for communication, so game is 'provably fair'. So ...
153 views

### Public-key based on roots of polynomial

In general it's hard to calculate the roots of a given polynomial $P(x)$. But the other way back calculating the coefficients is much easier (Vieta's formulas). If this is a one-way function, is it ...
116 views

91 views

### Convincing “someone” on the (in)validity of DH tuple without revealing $u,v$

Is there a way of convincing someone on (in)validity of Diffie Hellman tuple $<g, g^u, g^v, g^{w}>$ without giving away $u,v$. or at least solve the Decisional Diffie Hellman Problem without ...
579 views

My question is related to PBKDF2. I am unsure how to validate user entered password with already existing hashes and salts. I have heard of the so called "length-constant" comparison which basically ...
594 views

### Simplified Fiat-Shamir example generates wrong output

I am trying to implement the Fiat-Shamir identification protocol, however the end results always fail to match. I am using algorithm's description from here. Preparation: Select 2 prime integers ...
117 views

### Modular protocol design

What does modular protocol design mean? Why does TLS not have modular protocol design? What protocols have modular design? (IPSec, SSH)
Consider RSA public-key encryption with public modulus $N=3953$. Suppose we know that the public keys $e_1=337$ and $e_2=23$ correspond with the decryption information $d_1=3385$ and $d_2=2663$. ...
I am trying to do multiplication in the GF($2^3$) defined by the irreducible minimum binary polynomial $X^3+X^2+1$. I want to multiply $A(x) * B(x)$ where $A(x) = x$ and $B(x) = x^2$. The ...