# All Questions

366 views

### Is XOR adequate for encrypting truly random data? [duplicate]

It is well-known that the two-time pad is very insecure. However, it seems unexploitable in the case where the plaintext is indistinguishable from random (ex. symmetric keys). Is this property ...
153 views

### Difference between Pseudo Mersenne primes and Generalized Mersenne primes

The field prime numbers $p$ proposed by the NIST standards are referred to as Generalized Mersenne prime numbers [1] and as Pseudo Mersenne prime numbers [2]. Is there a difference between Pseudo ...
31 views

### Why Boneh-Franklin BasicIdent IBE is not chosen-ciphertext secure? Why use random oracle?

I don't know why BasicIdent is not chosen-ciphertext secure. If there are anybody who knows well, please explain it to me with example. Moreover, I don't know random oracle and its usage for security ...
33 views

### Is it okay to send an encrypted key using XSalsa20-Poly1305, and send subsequent messages using ChaCha20-Poly1305?

I am looking at a cryptographic protocol in a somewhat unusual environment: the communicating parties can share arbitrarily long secret keys over a secure channel. If forward secrecy is not required, ...
13 views

### Do Wegman-Carter authenticators allow key reuse if the authenticator result is kept secret?

Poly1305 (and GHASH) are secure authenticators, but only for one use. Thus, nonce reuse in Poly1305-AES, ChaCha20-Poly1305, and AES-GCM all reveal the authentication key. However, my understanding ...
17 views

### Are there known practical attacks on RC4-dropN? [duplicate]

RC4 is known to leak information about the first few bytes of the ciphertext due to keystream biases. However, are there known attacks on RC4-drop[N] where N is large enough, that leak information ...
23 views

### Implementing cryptosystems with various programming langauges

I know that most cryptosystems are currently implemented in C/C++. Has there been any effort to implement cryptosystems in programming languages such as Agda where proofs can be written about ...
115 views

### Is TLS secure against VM reset attacks?

Is the TLS protocol secure against VM reset attacks? Background: Imagine running cryptographic software inside a virtual machine (VM). A VM reset attack is one where the the state of the software is ...
145 views

### Are there reasonably secure online voting implementations e.g. for student council elections?

Assume a university want to elect the student council. This was done via paper ballot and there is a need to reach more students for voting, so electronic voting is on the table. While researching ...
48 views

### LR-Oracle Experiment in Lindell and Katz

In reference to the LR-Oracle experiment in “Introduction to Modern Cryptography” (2nd edition) by Lindell & Katz, Definition 3.23 states a scheme $\pi = (Gen,Enc_K,Dec_K)$ is CPA secure for ...
49 views

### Affine cipher and plaintext attacks

Last year, a question concerning plaintext attacks was posted at Mathematics.SE: “Plaintext attacks: affine cipher”. I have no problem to see how to solve it when we are given two ciphertexts and ...
52 views

### Finding a secret cipher given the key and known plaintext?

Let $x,y,k$ be plain text, cipher text and key respectively. Also suppose $\operatorname{Enc}$ is the algorithm of encryption for block cipher with size $n$. So we have $$\operatorname{Enc}_k(x)=y$$ ...
34 views

I am trying to devise an encryption scheme such that an adversary can win the following game with probability at most $1/2 + \epsilon$. Adversary gives challenger two plaintext messages $m_1$ and ...
3 views

### Difference between pgp keys format? [migrated]

I am willing to spend some amount of time developing yet another license manager for desktop Java application. After some looking around I discovered JCPUID by Iakin that is free to use and should ...
114 views

### How can comparision like (>=,==) be done using homomorphic encryption?

Since we know that Homomorphic encryption allow computation on encrypted data. Let two n-bit integers $(x,y)$ are encrypted using some LWE public key cryptography. For example - if $x'= HEnc(x,pk)$ ...
63 views

### Forward Secrecy when using non-ephemeral DH

In context SSL/TLS, reading up on various sites, I find forward secrecy in DH key exchange being linked to its ephemeral use i.e. DHE. I don't fully understand this link, where does following ...
55 views

### Encryption Oracle Avoidance

I have a case where it may be possible for an adversary to deduce the plaintext inputs that went into creating a AES-128-GCM encrypted message (there is good IV diversity across the encrypted ...
21 views

### Do any Identity-based Encryption Systems support messaging between domains?

Identity Based Encryption is covered under RFC 5091 (specifying the algorithm), 5408 (specifying data structures), and 5409 (using IBE with Cryptographic Message Syntax). However, every IBE ...
69 views

### How is SSL secure?

if the client and the server need to exchange keys and I can sniff it, wouldn't I be able to decrypt the data transported?
21 views

### When is data origin authentication necessary but non-repudiation not?

I have been considering this question now for a week and I just cannot find an answer. I understand that non-repudiation cannot be provided without data origin authentication but I cannot think of an ...
166 views

### What is wrong in the following algorithm for computing a hash function using RSA?

I'm studying for a cryto exam and have run across this question which has stumped me. What is wrong in the following algorithm for computing a hash function? Take a message $M$, generate a random ...
582 views

### When would you increment a nonce and when not?

K is the shared key for encryption known by _Alice and _Bob. $N_A$ is a nonce created by Alice. The function f is the increment by 1 function. (1) Alice -> Bob: $E_K(N_A)$ So Alice encrypts a nonce ...
54 views

### Q: Relevance of physical layer security to cryptography

I found that there are quite some active research activities in a field named "physical layer security", with in particular some types of codes that apparently are different from those commonly ...
150 views

### Hamiltonian Path Zero Knowledge Proof using Commitments to a Series of Edges

Commonly, Zero Knowledge Proofs based on the Hamiltonian Path or Cycle problems are given as follows: The Prover has a graph $G$, for which he knows a Hamiltonian Path (or Cycle). $G$ is also known ...
25 views

### Double add always + scalar blinding [migrated]

I am using double add always + scalar blinding for pointMultiplication in projective coordinates (x,y,z). poinMultiplication Class ...
101 views

### help with cryptanalysis of a sponge permutation

I have been studying and researching hash functions. So far my research has led me to the sponge construction. It appears that the permutation used in the sponge to stir the state is more or less ...
16 views

### XOR of one-way function [migrated]

Considering the top answer to this question here, http://cs.stackexchange.com/a/10418, wouldn't this counter-example imply that we've inverted $f$? Consider the reduction where we take in $f(x_1)$ and ...
1k views

Someone posted this on reddit a few days ago, and I haven't found much about it except for links back to the same page. Here's the article ...
22 views

### Role of Fermat's little theorem in the proof of correctness of ElGamal signature

In the Wikipedia article about the ElGamal signature scheme it is written, that Fermat's little theorem is used in the following proof of correctness: From the signature generation in ElGamal we can ...
536 views

### Hashing a password before using for online accounts

I don't actually know what I'm talking about, so apologies if I get anything wrong. At the moment I have a password naming system for most of my online accounts that looks something like this: ...
59 views

For a personal project, I'm building a password manager, based off the project in this syllabus from Stanford http://crypto.stanford.edu/~dabo/cs255/hw_and_proj/proj1.pdf Since I don't exactly have ...
36 views

### Block cipher detect padding behaviour

Suppose i have a crypto provider, i.e: i give that provider some plaintext bytes and get the encrypted result. I don't know the used encryption method, but i know ...
67 views

### Discrete logarithm hash function Exercises

I have a problem with this exercise: Let $G$ be a group of order a prime $q$ and let $g, h$, be two randomly selected elements of $G$, with $g,h\ne 1$. Consider the following hash function on ...
940 views

### Why do we implement a protocol?

In general, after we design a secure cryptographic protocol and make sure that it is efficient (e.g. through complexity analysis) we implement it. Questions: Do we implement it for proof of ...
67 views

### Encryption that could have multiple decryption key

The title looks strange but it is to deal with this situation. The data we have should only be accessible by our end user and data administrators, not anyone else. Ideally, each user should have ...
91 views

### System parameters in identity-based encryption

In IBE schemes, the system parameters are $(q, \mathbb{G}, F, \hat{e}, P, Q, T, H_1)$. I don't know $\hat{e}$. For example, in type A pairing… ...
101 views

### Best attack on double DES followed by XOR with third key

What is the best attack here? $E_k(m)=DES_{k1}(DES_{k2}(m)) \oplus k3$
43 views

### How to correctly encrypt data with proper authentication using AES-256-CBC in php?

I have been using the openssl function for encrypting data with AES-256-CBC in php. I have been able to encrypt it using an unique IV (by generating with openssl_random_pseudo_bytes)for each new ...
67 views

### How to encrypt a number using AES?

How to do padding to input giving to encrypt using AES algorithm if the input is less than 128 bits? I need to encrypt a decimal number such as 10.
102 views

### Security of encrypting many short values with AES in GCM mode

We intend to encrypt certain values in a database which holds personal information such as addresses so as to prevent data leakage should the database be compromised. The intention is that each field ...
69 views

### Plaintext and ciphertext block sizes

How can you determine the largest plaintext block size and smallest ciphertext size if you used RSA with $n=59768553302699443$ using an alphabet with $27$ characters?
55 views

### Can BPS be used to encrypt a single integer, and restrict the output to a certain range?

As per specifications document, "We have the natural restriction that at least two characters must be ciphered, i.e. $b \geq 2$" where each character is represented by an integer of certain ...
114 views

### Finding the subgroup in isogeny-based cryptography

Isogeny-based cryptography is one of the newest post-quantum cryptography. Hardness of this system is based on finding isogeny between two elliptic curves. Also this is theorem: Elliptic curves ...
32 views

### emulation of a one-time-pad based on multiple keys of running cipher

a one-time-pad cipher is one that uses a long "truly" random key that is as long as the plain text message. the key must be only used once. the key must not be derived from pseudo random number ...
8 views

### EC Schnorr or Ed25519 Java card implementation [migrated]

I am trying to implement ED25519 in java card. Since there are many restrictions with respect to data types and sizes, its becoming tough to implement it, especially curve operations. Is there any ...
288 views

### Which cryptography technique does not increase the size of the plain data?

I want to encrypt some data(text/voice/video) but it is essential that the size of the cipher data remains the same as the plain data. Which techniques can I use, and how secure are these techniques ...
60 views

### How to split up $GF(2^{128})$ into smaller fields?

I've heard that it's possible to split up $GF(2^{128})$ into copies of several smaller fields like $GF(4)$ so as to make the math easier in some cases. How do you do that? I know how it works for ...
47 views

### How to generate fingerprint for PGP public key

I would like to know how to generate a fingerprint for an openPGP public key. To be clear, I'm interested in how the fingerprint is generated. I'm aware that I can get the fingerprint with a ...
Let's say I've got two people that are trying to talk in a public channel $A$ and $B$ and they want to preserve their confidentiality and integrity. Which cryptographic algorithm would they want to ...