# All Questions

22 views

### Real-world example of using ring signature [closed]

Code also will be great. There is one in wikipedia, but it's awful. Have you got something more usable?
103 views

### Is entropy being lost when the hash of a secret has a specific format?

Bitcoin's mini private key format works by brute forcing random data to produce a secret so that when appending ? and then hashing with sha256 it will produce a ...
349 views

### Combining several symmetric ciphers using XOR

I have seen a talk by Rüdiger Weis, where he says that you can combine two symmetric ciphers using XOR. According to him, that has the effect that its sufficient if only one of the ciphers is secure. ...
77 views

### Hashing a Diffie-Hellman result

In many implementations, the result of the Diffie-Hellman algorithm is hashed. I read that: Hashing the shared secret point prevents an attacker from gaining more information about the EC private ...
21 views

### Possible to detect if a message is PGP encrypted/signed (ciphertext)

Let's say I have a text field somewhere (i.e. an interactive user submitted text field on a PHP script, or a console application. Basically anything that accepts user input.) How can I detect if said ...
94 views

### Is full Homomorphic encryption quantum resistant?

Since most of our asymmetric encryption algorithms are going to be out-of-date in a couple of year due to Shor's algorithm, I was wondering about the future of FHE schemes. I have found this paper, ...
78 views

### Calculating $\mathbb F_{p^2}$-rational points of an elliptic curve defined over $\mathbb F_p$

How can I calculate points on an elliptic curve defined over $\mathbb F_p$, for example $y^2 \equiv x^3 + 1 \pmod p$, with coordinates in $\mathbb F_{p^2}$? (points might have complex number format in ...
30 views

### Small subgroup attack on Diffie-Hellman

I am trying to understand the small subgroup attack on Diffie-Hellman. I will present the attack and try to explain why it works. Let be a group $\mathbb{Z}_p^*$ where $p$ is a large prime, so the ...
23 views

### How ECDH algorithm selects modulus value?

I am curious to know how an ECDH algorithms select a module value, if both ends A & B can generate same shared key using the public key of each other ? If I understood DH correctly, both A and B ...
48 views

### Let $G$ be a PRG. Are the following $G'$ constructions based on $G$ necessarily PRGs?

$G$ is a PRG where $|G(s)| > 2 \cdot |s|$. $G'(s) = G(s0^{|s|})$. $G'(s) = G(s_1...s_{n/2})$, where $s = s_1...s_n$. My question here is whether my own proposed solutions are correct and do ...
64 views

### What is this encryption system called?

Let's say you want to break down a message, for simplicity it is just a bit $0$ or $1$, $m$ into two messages $(m_1, m_2)$ as follows: If $m =0$, then $(m_1, m_2) = (0, 0)$ with probability $1/2$ and ...
46 views

### variant of Diffie–Hellman key exchange protocol

Motivation Consider the following variant of Diffie-Hellman key exchange protocol for two parties: Assume Alice and Bob share $\mathbb{G}$ of order $q$ generated by $g$ Alice samples $a$ ...
30 views

### Testing PRNG quality from ECC public keys?

Having a large set of ECC public keys $P_i = n_iB$ on a fixed curve $E$ over a prime field, is there a way to determine if coefficients $n_i$ were generated using a bad PRNG? In other words, can a ...
24 views

### Small n attack, how it works

I'm studying the Lamport's Hash one-time password scheme. This is the scheme: Alice wants to authenticate herself to Bob from a workstation that knows nothing about her. Alice only knows her ...
909 views

### What is the difference between Shannon entropy and saying that tossing a 6-sided die 100 times has more than 256-bit entropy?

I'm confused. I thought that tossing a 6-sided die 100 times had a greater than 256-bit entropy because $6^{99} < 2^{256} < 6^{100}$. (A similar concept appeared in this XKCD comic, where ...
10 views

### keytool -genseckey -alias TDES -keyalg DESede -keysize 128 works within jre/bin folder but not when the keytool.exe is on another location [migrated]

I would like to create a TDES key with size 128bits and 2KTDES key with 192bits for authentication in a Desfire smart card. Hence I have used the keytool to generate the jceks with the following ...
49 views

### File encryption with AES CTR mode

I understand that encrypting files in CTR mode is not perfectly safe, because it potentially leaves the files open for cryptanalysis, if the attacker has access to previous versions of the same files. ...
10 views

### Javascript equivalent to new SecretKeySpec(bytes[], “HmacSHA512”) [migrated]

what javascript equivalent code for following java code. SecretKeySpec key = new SecreatKeySpec(Bytes[], "HmacSHA512"); how can i acheive this in javascript ?? ...
127 views

### Cryptography and FPGA

I see a lot of papers about FPGA implementations. For what kind of "concrete" application should we implement cryptographic algorithms on FPGA ? Which secured application require such a huge data ...
89 views

### Why isn't a table used to solve the large number factoring problem?

Lots of modern encryption (RSA comes to mind) are based on the fact that factoring large numbers is hard. However, multiplying large numbers is much easier, and table lookups are very easy. Since ...
55 views

### Usage of Zero-knowledge proofs for NP-complete languages

It is well known that if OWFs/PRGs exist, then there is a zero knowledge proof for any NP-complete language, say G3C (graph coloring in 3 colors). The zero-knowledge notion maintains that any ...
291 views

### Is calculating HMAC from hashed input a good idea?

Original HMAC algorithm is as follows: H(K XOR opad || H(K XOR ipad || text)) What if text would replaced with H(text)? ...
36 views

### Prove that H(s) = G(!s) is a CPRNG if G(s) is one

Given a cryptographic pseudo-random number generator $G$, prove that $H$ with $H(s) = G(!s)$ is also a cryptographic pseudo-random number generator. Here $s$ is a binary string; $!s$ is its ...
43 views

### bare metal crypto library [migrated]

I am writing an application that will be run on bare metal, i.e. it will not run on a kernel and therefore cannot invoke system calls. There will also be no C runtime. Is there a crypto library I can ...
109 views

### Can it ever be impossible to invert a PRNG?

I've read about the possibility of inverting the Mersenne Twister after 624 numbers of output. 624 matches the state size of my implementation of the Twister. Coincidence? If the generator only ...
69 views

### Why not to use curve over field of $p^m$ with $p > 2$ for ECDSA?

I'm reading the ECDSA paper and they say you can only use ECDSA with odd-power fields $p$ or with binary fields $2^m$. Why not other power prime fields?
174 views

### Is it possible to get an RSA encryption key by comparing the unencrypted and encrypted file?

Exactly what the title says. If I have a RSA encrypted file, and the exact same file but decrypted, can I tell the key that was used from that information?
81 views

### Is there a formal definition of what a distinguisher is?

I've often been reading about (polynomially bounded) distinguishers in books or papers. Although by name and intuition it is somewhat clear what a distinguisher is and does, but i am asking myself ...
34 views

### Triple-DES DUKPT CBC PIN variant vs Data variant

Does any know the difference between triple des dukpt decryption algorithm with PIN variant and Data variant? I have done Triple DES DUKPT PIN variant, which generate session key from KSN and BDK. ...
31 views

### how many pairs of plaintext-ciphertext are needed before we break AES? [duplicate]

Imagine a set of words ($plaintext$) each are encrypted using AES-ECB mode and due to some leakage in the system an attacker could gain access to some pairs of $plaintext$ and $ciphertext$. But once ...
36 views

### Strong LRSW assumption for type 3 pairing groups

Why does the "strong LRSW" assumption by Ateniese et al. [Untraceable RFID Tags via Insubvertible Encryption, CCS'05] hold ONLY for type 3 pairings and NOT for symmetric pairings? Whereas, the LRSW ...
80 views

### Would the encryption of bigrams and trigrams weaken the code?

Supposing a rotor machine of the 1940s or 50s, with 36 characters instead of 26. Would the encryption of the ten additional characters as the most frequent bigrams or trigrams weaken the code? What ...
76 views

### DES hardware implementation of substitution lookup table [ ReWorked ]

I'm a crypto enthusiastic and student of cryptography. I'm developing a project with other students titled "A hardware implementation of a DES cryptography for educational purposes", our idea was to ...
47 views

### public key cryptography and authentication for cross-platform network application

I'm developing network based application for control and telemetry on Linux based embedded system. I'm using ZMQ network library and Google Protocol Buffers serialization library for communication ...
71 views

### Why must we generate the signature before any compression being done at PGP?

I have done some research on PGP and I found out there are of two reasons why we must generate the signature before doing any compression. Yet, I am not sure I really understand them both. One ...
22 views

### Details related to the ZIP algorithm used in PGP message encryption? [closed]

I am very new to PGP. PGP encryption works with hash function, asymmetric encryption, symmetric encryption and a zip algorithm (LZ77). What I know is that the zip algorithm is used to reduce the ...
150 views

### How to verify the integrity of RSA encrypted messages?

I need to encrypt messages using PublicKeyCrypto and send it to the server, where the message should be decrypted. I'm aware of the Padding Oracle Attack and want to apply a server side integrity ...
80 views

### Mathematically / statistically “safe” way to differentiate between crypto and random blob?

I assume the United Kingdom will impose (as opposed to just talk about it) restrictions on crypto software that may be used within it's borders. Me, quite the border clown (yes, I always bring a up ...
41 views

### Is RSA vulnerable to the padding oracle attack?

I know that AES in combination with CBC mode is vulnerable against the Padding Oracle Attack. RSA also uses some kind of padding, hence can this attack be apply to RSA encrypted messages too?
55 views

### Perfect secrecy with n-time key

How can you encrypt $n$ messages with the same key, and have the same theoretical security you'd have encrypting a single message with a one time pad? For example, how can you encrypt two messages ...
64 views

### Anonymous offline digital cash scheme

Can a digital cash scheme exist that is anonymous and offline using blind signature and anonymous signature?
89 views

### How hard is the Solitaire cipher to crack?

Assuming your deck is completely random and that it is not retrivable, how hard would it be for a casual person to decrypt a message encrypted with the Solitaire cipher?
62 views

### Hash and salt or salt and hash?

People say "hash and salt", but aren't you supposed to salt password the first, and then hash it? So that means its called "salt and hash" right?
43 views

### Given just the hash of a file, can I verify that the file contains a specific data block?

Imagine I only have the hash of a file which we can call hash(file). Then a user sends me a data block (or section) of the same file, which we can call ...
186 views

### What does “a 15360-bit RSA key is the equivalent to a 256-bit symmetric key” mean?

NIST key management guidelines suggest that 15360-bit RSA keys are equivalent in strength to 256-bit symmetric keys. If a 15360-bit RSA key is the equivalent to a 256-bit symmetric key, does that mean ...
55 views

### How badly does disclosing an M-bit prefix of an N-bit private key compromise security?

I apologize profusely for knowing nothing about cryptography, please go easy on me! I'm working on a project where I have a 2048-bit RSA private key and a public certificate generated from the ...
17 views

### Efficient and secure authenticated key exchange protocol(s)

In general, I would like to know which authenticated key exchange protocol is efficient and secure ? There may be many, but name at least a few of them.
12 views

### Is SRP protocol a non-interactive key exchange protocol?

I request to know whether SRP authentication protocol is non-interactive key exchange protocol? Also, please explain difference between interactive and non-interactive protocols.