# All Questions

515 views

### How exactly are GPG keys mathematically related, and prime numbers inside of GPG general

Before anyone suggest it, I've yet to pick up "Applied Cryptography" I'm planning on picking it up the next time I visit amazon. I know that the keys are somehow mathematically related, and I know ...
201 views

### Is there a way to systematically calculate the public exponent $e$ in RSA?

I'm learning RSA in one of my classes and we were given a problem: $p = 5$, $q = 11$ I have done the following steps: $n = 5 \cdot 11 = 55$ $\phi = (5-1)\cdot(11-1) = 40$ I know that to ...
268 views

### In RSA, why does $p$ have to be bigger than $q$ where $n=p \times q$?

In openSSL – during RSA key generation – if $q$ is bigger than $p$, they exchange them. Why is that?
147 views

### Is there an oblivious decryption scheme?

Alice has $K$; Bob has $E(K, m)$; Is there such a scheme that enables Alice decrypts $E(K, m)$ without knowing $m$, and Bob gets $m$ ?
323 views

### RSA assumption and cryptography

The RSA assumption states that it is hard to find $m$, given $c = m^e \bmod{n}$, $e$, and $n$ (for appropriate choice of $n,e$). Suppose that there exists an algorithm, $D(c,e,n)$, that finds $m$ in ...
144 views

### Can anyone tell me the name of this cipher please?

Can anyone tell me the name of this cipher please? I know it's a simple substitution cipher, I just don't know the name of it. Cipher Key: help Cipher alphabet: ...
143 views

### Why is it that researchers prefer finding secure software solutions over secure hardware solutions?

My understanding is crypto researchers tend to prefer solving a problem in software without the need for secure hardware. Why is this? What is the big problem with using secure hardware if the ...
1k views

### What happens when a root CA has its private key compromised?

What happens when a root CA has its private key compromised? Then all children in the tree are compromised too? And then all certificates are compromised? What needs to happen then? Related: - How ...
384 views

### Can ECB mode really leak some characters?

In an Ars Technica article 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 ...
466 views

### What is the difference between a HMAC and a hash of data?

On a recent question it became apparent that there's a significant difference between an HMAC of input data and a hash of input data. What exactly is the difference between an HMAC and a hash of a ...
7k views

### Where i can find an AES implementation in python?

Where i can find a "reviewed" version of AES implementation in python. Not an API like PyCrypto whereby you can call AES algorithms in a single line.
213 views

### Subgroups generators with respect to group generators of composite order

If I have a group $\mathcal{G}$ of order $N=npq$ and subgroups $\mathcal{G_n,G_p,G_q}$ of order $n$, $p$, $g$ respectively and if $g$ is a generator of $\mathcal{G}$ why then $g^{nq}$ is a generator ...
1k views

### Is my pseudo-random initialization vector secure?

How can I know if I am generating a secure pseudorandom initialization vector? Currently I am planning to generate a pseudo-random initialization Vector using current date and time - is this secure ...
171 views

### How do I generate a number for a lottery and later proves its existence

I want to create a lottery that works like this: I choose a secret number A in the range [0:999] and publish an object B. People must try to guess the number A to win. When somebody wins, I want to ...
211 views

### Any weakness when sha256'ing output of sha256, repeatedly?

Is it significantly easier to reverse a sha256 hash if you know that the input was a 32 byte output of sha256? I assume for most outputs of sha256 there will be zero, one or two possible 32 byte ...
220 views

### Choice of MAC and handling it correctly

I have recently learned that Encrypt-then-MAC is recommended when using symmetric encryption. I have two closely related questions related to that, which is why I am posting them as one: Looking ...
131 views

### How can one parallelize tasks in CTR-AES for maximum performance?

From what I have read it seems like one of the purported benefits of using CTR mode AES, is that it can be parallelized to a greater degree, or maybe more easily than the other block cipher modes, ...
578 views

### Problems with using AES Key as IV in CBC-Mode

I'm a pentester and currently analysing a web application which are using some strange encryption scheme. The point is: They encrypt using AES-128, generate a (not cryptographic secure) key and use ...
170 views

### Frequency of letters change by the length of the texts?

In terms of the frequency of letters, how is it possible to have different frequent letters when the length of the text I'm analyzing is shorter? At the moment, I'm comparing the frequencies of a ...
858 views

### Why is a 2048-bit public RSA key represented by 540 hexadecimal characters in X.509 Certificates?

In the public certificate, an RSA public key specified as 2048 bits long is represented by 540 hexadecimal characters. Converted to base-2, this yields 2160 bits, 112 more than the stated 2048.
245 views

### How does this happen in RSA malleability?

I don't understand how the $E(m)$ turns into $E(mt)$. I mean, I don't know how does that transformation happen and how does the equation occur. $$E(m) \cdot t^e \bmod n = (mt)^e \bmod n = E(mt)$$ ...
604 views

### How does one deal with a negative “d” in RSA?

I'm trying to write my own RSA implementation using the textbook approach — which I know is not optimal — of picking primes $p$ and $q$, then computing Euler's totient $phi$, then randomly picking an ...
2k views

### What is the meaning of “trapdoor” in cryptography?

I do not really understand the meaning of a "trapdoor" in cryptography, so here are my questions: What is the meaning of trapdoor and how can I convert a word or string using a trapdoor in ...
515 views

### Combining LFSRs for Stream Ciphers: Why do we need high non-linearity?

Linear Feedback Shift Registers (LFSRs) can be excellent (efficient, fast, and with good statistial properties) pseudo-random generators. Many stream ciphers are based on LFSRs and one of the possible ...
340 views

### encrypt message with one digest 0-9 instead of 01-26

How much will the security of one-time pad decrease if I use one digit from 0-9 instead of 1-26? for example plaintext = "blue" and ...
669 views

### Can we replace the XOR operation in DES with some other operation?

Can we replace the XOR operation in the DES algorithm with some other operation? If so, does it work for both encryption and decryption?
479 views

### Why are these specific values used to initialise the hash buffer in SHA-512?

I'm reading the book Network Security Essentials written by William Stallings. To create a message digest with SHA-512, we have to go through some steps: append padding bits. append length ...
2k views

### Is RSASSA-PKCS1-v1_5 a good signature scheme for new systems?

Is RSASSA-PKCS1-v1_5 a good signature scheme to recommend that people use in new systems? Is it believed to be secure and represent the state-of-the-art in RSA-based signatures? I understand that ...
646 views

### ABC Conjecture's Impact on RSA Encryption

A recent proof of the ABC Conjecture has been released by one Shinichi Mochizuki. Now, I'm not well versed in mathematics but it would appear that this proof implies that finding prime factors could ...
302 views

### Is the Blum Blum Shub PRNG suitable to create initialization vectors?

Is it a good idea to use a Blum Blum Shub Generator to create my initialization Vector (IV) in AES-OFB (Output Feedback Mode)?
3k views

### How can I convert a DER ECDSA signature to ASN.1?

I having trouble verifying an ECDSA signature signed using client side javascript with Java/BouncyCastle. The javascript signing function source: ...
151 views

### What, cryptographically speaking, is a “long message”?

I have read about long message attacks on some cryptographic hash functions. However, I don't quite understand what is being referred to as a "long message". Also, do long message attacks only apply ...
214 views

### Would xoring 2 independant AES CTRs to produce p-rand introduce vulnerabilities?

Assuming $$AES_{k_1}(C_1) \oplus AES_{k_2}(C_2)$$ where AES is used in CTR mode, $C$ is a 128 bit incrementing counter, keys and counters for both transforms are random as well as unique, and the ...
222 views

### How do I produce a stream of secure random numbers from AES-Counter mode?

I have just made my own program to encipher, using AES in counter mode, and have validated it using NIST data. So I know I have done it properly. I have read that AES-CTR can produce a stream of ...
168 views

### Is $H(x) = x^2 \bmod p$ pre-image resistant, second pre-image resistant and/or collision resistant

I have the function $H(x) = x^2\bmod p$ , where $p$ is a prime of length n bits and this function maps to the message $x$ to a n-bit hash value $H(x)$. I need to find out if it is pre-image ...
711 views

### Can a salt for a password hash be public?

For my understanding salts in password hashes are used to prevent the precomputation of $plaintext \to hashvalues$ (rainbow tables). I know from different threads, it is not necessary to keep the ...
57 views

### are ideal hashes possible to create?

In a hash function, you map an input of arbitrary length to an output of finite length such that the relationship is one-to-one (or at least that's what you are trying to achieve). Hence, isn't it ...
105 views

### Could someone reuse client certificates?

To my understanding, if a server “cert+key” (RSA) is compromised, than the SSL/TLS network traffic can be decrypted. What about a client “cert+key” (RSA)? Could someone reuse client certificates? ...
333 views

### what is the state of the art algorithm to encrypt credit card data

We have a business requirement to keep credit card data. What is today's (Nov 2013) state of the art algorithm to encrypt credit card data that will be saved on disk? Additionally, I'd appreciate ...
471 views

### Certificateless cryptography

While reading "Certificateless Public Key Cryptography" by Author Sattam S. Al-Riyami and Kenneth G. Paterson, they have considered generation of private keys by a Key Generation Center (KGC). If the ...
342 views

### Difference between collision resistance and target collision resistance

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 ...
399 views

### Hide a weakness in ECC by choosing the prime or one of the curve coefficients

Suppose you are given a value $c$. Can you find a prime $p$ and an integer $b$ such that the elliptic curve $$E: y^2 \equiv x^3 -3x + b \pmod p$$ is cryptographically weak? You need to choose ...
196 views

### How did they factor RSA-704?

I don't understand the 'Wiedemann algorithm' works. Can someone explain the factoring of RSA-704 in an easy way?
393 views

### Secure use-cases of block cipher with 64-bit block size

In what cases can we use a weak block cipher like DES ? More precisely, Are there specific situation in which a weaken block cipher can still be used, for instance for certain types of plaintext ?
519 views

### Why RSA uses {d,n} as private key instead of {e,n}?

While studying the RSA algorithm I referred to some books and some sites such as RSA (wikipedia) and all of them chose {d,n} as the secret (private) key and release {e,n} as the public key but as d ...
727 views

### random number generator 10-side dice alternative

A lot of sites (e.g. Dirk Rijmenants') refer to 10-side dice to generate random number for one-time-pad. I was thinking about new ways to generate random numbers, letters and passwords. here what I ...
971 views

### Keys required for cryptography

I am reading an article on cryptography at following location: http://www.entrust.com/resources/pdf/cryptointro.pdf Historically, encryption systems used what is known as symmetric cryptography. ...
710 views

### Berlekamp-Massey algorithm: case when sequence length is less than double the length of the LFSR

Suppose that we have a sequence of $N$ digits which is produced by a Linear Feedback Shift Register (LFSR) and the shortest such LFSR is of length $L$. A very important tool in cryptanalysis of stream ...