# All Questions

105 views

### Is this a good communication scheme?

I'm writing a wrapper for a chat program to allow for end-to-end encryption. I'm using Python and PyCrypto to accomplish this. I'd like to use a well known library to do this, but to my knowledge, ...
62 views

### RSA numerical questions

Let $n$ be the modular arithmetic, $p$ and $q$ the two large primes such that $n=p*q$ and $e$ the public exponent. Here they are two "simple" numerical questions: If $p = 13$ and $q = 17$, what is ...
247 views

### Difference between AES CMAC and AES HMAC?

Can someone elaborate on how 'signing' is done using AES- CMAC and AES-HMAC? HMAC Signing as I understand: Compute the HMAC( Hash the key and the input concatenated in a special way) Verification: ...
779 views

### Are there any practical ways to transfer random data securely?

The owner of the random.org service recommends that you do not use randomly generated numbers from their website in cryptographic keys. This makes sense, but it got me wondering. Is it possible to ...
113 views

### Why does the time complexity of RSA encryption and decryption depend on the size of the modulus?

I would think that the time complexity would depend on the exponent, not the number of bits in the modulus. For example, if the exponent were 5, using the "naive" method, we would perform 5 ...
11 views

### A standard for multi-key provider encrypted data?

I'm looking for a standard that standardizes data encryption with multiple and diverse key sources to represent a heterogene access structure and culture. The standard must offer the following ...
47 views

### What information should I send along with an AES ciphertext and is there any standard to do that?

While using some crypto implementations I got to see that many times a comment is added to the ciphertext. For example: ...
67 views

### Theoretical security of bit rotation for encyption

This is a theoretical question. I have a idea, encryption by bit rotation in byte. Do not know if something like this already exists. General concept is: First n bytes is rotated to left or right ...
40 views

I realize it's generally considered bad idea to use the same password everywhere. I can use icloud / lastpass to generate my passwords for me, but that leaves me clueless when I don't have access to ...
149 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 ...
32 views

### Are collisions in AES-128 theoretically possible when the plaintext is the same? [duplicate]

Is it theoretically possible to find $P$, $K$, and $K^\prime$ such that $E_K(P) = E_{K^\prime}(P)$ where $E$ is AES-128 and $K \ne K^\prime$? I'd imagine this would be infeasible, but is it actually ...
117 views

### Is there such a thing as a hash function with a fixed size input?

That seems like it would be a useful primitive. Using it in place of a block cipher in the Merkle–Damgård construction would give a variable-length hash, maybe without the tricky business with related ...
116 views

### S boxes in Blowfish

I know how the s-boxes in blowfish are initialized, but how is the output sorted, I mean which bit from the input goes where in the box ? and what do mean they have 256 entries if they are 32-bit ...
73 views

### How exactly does certificate based authentication work?

I know the concept of key generation, as well as encryption and decryption using public and private keys. When it comes to authenticating a user by a server, in general there are three types: ...
39 views

### When we use permutation and random long sting to hide a message

This question is modified version of this: Can we use merely permutation to hide a message? I have an English name $m=m_1 || m_2 ||..||m_{30}$. I pick a random string $d=d_1 ||..||d_{70}$ I mix ...
730 views

### Is this DIY remote lock protocol secure?

I need your advice on following scheme of exchange protocol between remote lock and key. I'm planning to use following algorithm: Key generates unique value that never repeats (in reality it's just ...
349 views

### How to determine the order of an elliptic curve group from its parameters?

Let $\quad E:\; y^2 = x^3 + ax + b \quad$ be an elliptic curve defined over a finite field $\mathbb F_q$ where $q = p^n$, $a,b \in \mathbb F_q$ and $p \neq 2, 3$. By Hasse's theorem we know that the ...
44 views

### Security for secret key of server in Identity-based Encryption

In the key set up phase, server generates Pub=s.P, where s is the secret key.Then , it gives clients Pub,P as public parameters and pairing descriptions. Is it possible for clients to pre-compute r.P ...
42 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, ...
59 views

### Should the most significant byte of a cryptograhic key be nonzero?

Is it safer to give a non zero value to the most significant byte (MSB) of a cryptographic key to ensure its length (not 31 instead of 32 for an EC private key on a 256-bit curve for example)? Or is ...
122 views

### How to convert RSA public keys to one key to use for text hashing?

I've recently asked a question about RSA encryption. One of the things that I don't understand is the usage of two public keys. In the example on Wikipedia, a message is encrypted like: ...
183 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 ...
337 views

### Parallel-resistant proof-of-work scheme?

I am looking for a proof-of-work scheme which cannot be effectively parallelized. For example, in hashcash (and by extension bitcoin) you have some collision-resistant hash function $f()$, a target ...
41 views

### Vulnerabilities in SHA-1 [duplicate]

Are there any known vulnerabilities in SHA-1 that can be exploited? Certain patterns that it shows? I recently performed a frequency analysis using 20,000 common words, and found nothing exploitable. ...
222 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 ...
56 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 ...
40 views

### Compressing AES [duplicate]

I have this program which encrypts multiple files using AES then compress it using LZO into one single file. The problem is that the final file is almost equal in size than all the files which means ...
29 views

### Subset sum hardness

Hardness of a subset sum probleme depends on it's density. Is it possible for a subset sum problem to be intractable even if it's density is less than 0.9408 ?
240 views

### What is the “compression function” in Merkle-Damgård?

Is the "compression function" in Merkle-Damgård just a collision-resistant, one-way hash function but one that operates only on fixed size inputs? If so, is MD just a way to extend it to work on ...
64 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$$ ...
19 views

### Security issues with self encryption? [duplicate]

I'm thinking about the scenario of using a set of (potentially untrusted) hosts to store (potentially private) files. Think something like distributed backup where you contribute some disk space and ...
61 views

### Degrade in performance with SSL_OP_SINGLE_ECDH_USE?

We have used SSL_OP_SINGLE_ECDH_USE when setting up our SSL_CTX . This seems to be causing a degrade in performance. I'm not able to find proper documentation for it except that it generates new ...
133 views

### history of non secret cryptograph

Prior to the discovery of any specific public-key schemes, such as RSA, an existence proof was developed whose purpose was to demonstrate that public-key encryption is possible in theory. Consider ...
55 views

### How much information is revealed?

Let Alice pick $v_{1}$,$m_{1}$$\in \mathbb{P} and Bob v_{2},m_{2}$$\in \mathbb{P}$. Now Alice computes $v_{1}$$^{m_{1}} and so Bob does v_{2}$$^{m_{2}}$ Then Alice exchanges $v_{1}$$^{m_{1}}$ ...
107 views

### In interactive proofs, do we assume that the prover can always solve the problem?

I'm having a difficult time understanding a concept from interactive proofs: A trivial interactive proof for the graph isomorphism problem is having the prover just send a permutation that shows an ...
84 views

### How can a message encrypted with the public key be decrypted with the private key? [duplicate]

I've been reading about encryption and have a basic understanding of the concept. What I don't understand, however, is how a calculation with one key can result in a number that, through calculation ...
1k views

### Can I use a one time pad key twice with random plaintext?

I understand the basics of OTP: $|\text{key space}| = |\text{plaintext space}|$ implies perfect security, key reuse destroys this. Cryptanalysis on the $N$-Time Pad for $N > 1$ involves finding ...
61 views

### Function with no fast path and with fast proof

When a function is iterated and each time a previous result is used as input to the next iteration (feedback), so that there is a limited benefit from parallel computing, is there such function that: ...
62 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 ...
39 views

### Show that the shift, substitution, and Vigenere ciphers are all trivial to break using a known-plaintext attack

i think that we can use the notion of knwn plan text that we could have pairs of both cipher and plantext msg and try to find way from one to another to recover the key i dont knw how to make it with ...
523 views

### What is an example of a secure sigma proof?

I want to implement Threshold Elgamal as described in section 6.3.1 and in the decryption phase each party must broadcast a sigma proof to show that it actually has a valid secret share of the secret ...
141 views

### Collision free one way function

I was playing with a function that I think is collision free and uninvertible assuming the hardness of integer factorization. I am unfortunately not as skilled at math as I would like to be, and do ...
32 views

### no speedup from preprocessing in blynn's PBC library

I am implementing some pairing-based cryptography protocol using blynn's PBC library. I am only at the beginning and I wanted to confirm that preprocessing does increase the speed. However I seem to ...
92 views

### pairing parameters in PBC library

I would like to know what are the pairing parameters of PBC library and what are they used for? Here an example where they are used. I noticed that we can give any file in the param subdirectory. Is ...
382 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 ...
74 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 ...
24 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 ...
175 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 ...
I'm learning the POK notion and definitions and as a self exercise I wante to prove the statement that the Hamiltonicity protocol is a POK system with knowledge error $1/2$. So the question will be ...