# All Questions

183 views

### What is the difference between key size and block size (for AES)

We are working on AES and want to develop a website which should provide an encryption facility but we are not understanding the difference between key and the block size. More appropriately what does ...
542 views

### Curve25519 vs “Million Dollar Curve”

Quoting from the Million Dollar Curve website: By using publicly verifiable randomness produced in February 2016 by many national lotteries from all around the world, we propose to generate a ...
33 views

### Would buffering socket send resist timing attacks

I have been reading and thinking about timing attacks on cryptographic systems. The answer to this question mentions the following: "The way to defend against timing attacks is to make sure the time ...
235 views

### Difference between Hardware implemented algorithm and software implemented one?

In the articles about cryptography I see the words Hardware implemented and Software implemented. I'm curious to know what is the difference between them? In the other words, even in the computer ...
86 views

### TPM's monotonic counters

I am reading the TPM Design Principles v1.2 §17 and do not feel I fully understand the example they give on how the counters would work. Apparently monotonic counters are used to prevent replay ...
486 views

### Can elliptic curve (25519) be used to encrypt file?

This is probably a simple question, but I haven't been able to see it stated anywhere. Is it possible to directly encrypt a file (of any length) with some form of EC using the 25519 curve. I know it'...
194 views

### Additively homomorphic cryptosystem with non-interactive zero-knowledge proof of non-negativity

I need a cryptosystem that is additively homomorphic. Paillier preferably, but not neccessarily. Also, for every ciphertext the private key holder must be able to prove non-interactively that the ...
72 views

### Security of this scheme

I am developing a software and I am not sure if it is completely secure. I have 22 Mb of data to encrypt used multiple times, random IV (generated using RAND_bytes from OpenSSL lib) and password ...
34 views

### Multi Party System with n-1 adversaries

Novice here. Is there a MPC function where no information is leaked even if all parties are not trustworthy ?
20 views

### TPM specification physical presence requirements

I am looking at TPM Main-Part 1 Design Principles_v1.2_rev116_01032011 and on page 69 of pdf, equivalent to page 57 of the document itself,there is comment on physical presence as follows: "Observe, ...
50 views

### Is the IV value in Davies Meyer construction public?

I am learning the construction of Davies-Meyer to construct a hash function from block ciphers. The definition that I found is $$H_i=E_{m_i}(H_{i-1})\oplus H_{i-1}.$$ where $E_k$ is a block cipher ...
409 views

### How is El Gamal different from Diffie Hellman Key Exchange [duplicate]

I am Reading RSA and Public-Key Cryptography by Mollin and I can't make out how El Gamal is different from Diffie Hellman Key Exchange. Any thoughts?
115 views

### How does encryption work in elliptic curve cryptography?

So I think I understand a good amount of the theory behind elliptic curve cryptography, however I am slightly unclear on how exactly a message in encrypted and then how is it decrypted. So my ...
23 views

### change in bits leads to change in rounds the reason? [duplicate]

In AES algorithm why there are 10 rounds for 128 bits whats the reason behind it like we have in raid storage technology or something else
46 views

### TCG design specification of TPM and nonce creation

I am reading TPM Main Part 1 Design Principles (PDF) which states: The creation of all nonce values MUST use the next $n$ bits from the TPM RNG. I do not know what this means, or how to find out ...
109 views

### Making both the IV and salt public for PBE with AES-CFB

Is it okay to make both the IV for AES-CFB and the salt for PBKDF2 public? Does this action of mine compromise security in any way? I have an implementation of this cipher and had previously asked a ...
23 views

### Key equal to IV [duplicate]

If I will use for AES encryption in CBC mode key that is equal to IV, how this change security (IV will be secret)?
214 views

### Lattice based attack on RSA

Let $n=pq$ be the RSA module and at least one of $p,q$ is a weak prime.It is proved that the number of such $1024$bit $n$ is at least $2^{759}$. With lattices we can factor these $n$ in a second (I ...
42 views

### Keys and key-stretching when authenticating requests?

I'm making a REST application and still a bit confused about this issue. basically, to authenticate incoming requests, I give out userId, issued timestamp, expiry timestamp (normally 3 months after ...
122 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 ...
125 views

I am using Android's keystore to generate a key which is protected by fingerprint authentication. This key can be used to encrypt any secrets. In my case, I want to encrypt a user password (which is ...
154 views

### AES key equal to IV (CBC mode)

Application uses AES in CBC mode with 128 bit key. In this implementation key is always same and is equal to IV. Can attacker get the key or decrypt data? If he knows: First and second blocks of ...
73 views

### Why does NaCl's crypto_auth have twice the security level of crypto_onetimeauth?

The crypto_auth function produces a 256-bit HMAC, with a 512-bit version also available. But the crypto_onetimeauth function (...
113 views

### Is super encryption (aka “multiple encryption”) always good?

I'm trying to use super encryption (also known as “multiple encryption”) with AES in CFB mode with IV and password salting and AES in CTR mode both without padding. I first use AES CFB and then AES in ...
683 views

### Which bitwise operations are used in SHA-256?

From the wikipedia entry on SHA-256 I'm a bit confused about which operations actually go into the algorithm. From the pseudo code it appears the operations are $\texttt{xor}$, $\texttt{and}$, rotate, ...
34 views

### Is EFS vulnerable to Chosen plaintext attack?

I have some backed up files encrypted with EFS and I lost the EFS certificate thus unable to decrypt the files. I understand that EFS uses the user certificate public key to encrypt the symmetric key (...
24 views

### Why do we need Merkle–Damgård strengthening [duplicate]

Reading through some manuals, wikis and other documentation I'm learning about Merkle–Damgård construction. I understand why padding beginning with '1', followed by '0's is needed, but I can't ...
49 views

### How secure is 'Plain Old RSA' [duplicate]

Let's say I use RSA encryption, it's 2048 bits and I use a simple character padding scheme, every character is turned into a 3 digit number and strung together, then encrypted. Saying that no message ...
179 views

### When/why is RSA (hybrid) encryption used rather than alternatives?

I've read that RSA is not meant for encrypting large plaintext because: (Are these also true for other public-key encryptions like ElGamal?) It is slow. Padding makes the ciphertext blocks much ...
248 views

### Modular exponentiation on calculator for textbook RSA

How do you encrypt $51$ with public key $(n,e) = (91,23)$ I understand that $c = 51^{23} \bmod 91$. How can I calculate the result on a calculator?
98 views

### Would it be better to use HKDF or SCrypt for deriving a child key?

Okay so I'm trying to derive a child public key from an EC public key. I've come up with a couple ideas and now I'd like to know which is more secure. Mp: The master key pair, this includes a ...
974 views

### Two different keys decrypting same content

is there some generally available algorithm which will encrypt a short string and generate two unique keys so that any of the two can be used to decrypt the message again? It doesn't has to be "super ...
75 views

### Schnorr Ring Signatures - wrong hash results

I don't know if I've placed the question right, It is half maths, half programming. I'm writing Schnorr Ring Signatures on Elliptic Curves in Java and I have a problem. I've found scheme on integers ...
215 views

### Do I understand (below) why Q = dP is easy while finding d is hard

As we all know for discussion of Dual_EC_DBRG, the point on an elliptic curve Q can be calculated from P and some (large) integer d $Q = dP$ And we know that knowledge of Q and P is not sufficient ...
165 views

### Shamir's Secret Scheme : Knowing the threshold

If I am decoding a key by applying shares, is it possible to know when the threshold has been reached, and the secret revealed, without having to be told what the threshold is? Also, is it possible ...
54 views

### What happens if you multiply a point with its order on complete Edwards curves?

I was recently working with some ECC crypto and stumbled across the following phrase on the SafeCurves page: The rational points of a complete Edwards curve are the pairs (x,y) of elements of ...
765 views

### Exchanging encrypted messages, and decrypting without a public key?

I know very little about encryption, but I was hoping someone could shed light on this cipher text exchange scheme I worked out in my head this morning: Bob wants to send Alice a message but doesn't ...
60 views

### Stateless proof-of-work system with 0-roundtrip time

I'm designing an API. To avoid abuse, I need to rate limit the requests somehow, but I don't want to do it per user as it's very easy to create new accounts automatically. I think a proof of work ...
122 views

### How long can a RSA public key be?

If I create an RSA of 4096 bits, what would be the range of the length in bytes of the public key in DER format? Also, will the private key always be exactly 4096 bits (512 bytes)? Does the public ...
106 views

### Comparison Vigènere vs. Monoalphabetic cipher

I have a question for a class of secure communication, but I have no idea about how to proceed in order to answer it. I'll be very grateful to whom replies to me. Assuming that brute force attack ...
228 views

### Why $e>n^{3/2}$ prevents Wiener's attack

Here's the Wiener's attack as I understand it. Suppose $n=pq$ with $q < p < 2q$, and $d < n^{1/4}/3$ where $ed=k\phi(n)+1$ and $e < \phi(n)$. \begin{align*} n-\phi(n) &=n-(p-1)(q-1)...
173 views

### How should I generate secure random numbers deterministically?

I have a 256-bit seed; call it P. From P, I need to derive 219 256-bit numbers deterministically. There's a catch, however: I want to derive them in any order. For example, I might need the 7878th ...
109 views

### Password in first line of file for AES-256 encryption

I'm using openssl with aes-256-cbc encryption to encrypt a file. The password is on the first line of the file and the ...
68 views

### What algorithm to use to rotate values in a predefined manner and be able to decrypt them back to the original?

What is the best practice to accomplish this? For example, let's have an initial value abc123456 and a seed secret_hash. I want ...
57 views

### Problem with this authentication protocol

Consider such authentication protocol: Alice and Bob share a key. Bob sends alice a nonce. Alice encrypts it with shared key and sends to bob. Now assume Alice was successfully authenticated. ...
98 views

### Is it safe to use cipher block sizing instead of padding?

I'm using this kind of technique instead of padding of cipher buffer (here goes pseudo-code): ...
248 views

### What is the most secure ECC Curve?

I have for a while used Koblitz curve (sect571k1), in ECDH and ECDSA. But I have started wonder if it is the most secure. I prefer security over efficiency. So the curve doesn't have to be the most ...
44 views

### How to check the integrity of a key received through mail using symmetric encryption?

I would like to provide access to encrypted data through a cloud service provider, using a pay-as-you-go model. This means that we will sometimes need to revoke a user's access to the data. To ...
70 views

### Encrypt the network adapter mac address so i can get 20 or 25 cipher text length

How do I encrypt a 12 character network adapter mac address so i can get in result with a 20 to 25 cipher text length?
47 views

### SHA256 message bytes

I have been reviewing the documentation for SHA256 and I believe the last two words (64 bits) for each chunk are not used in creating the message schedule. From Wikipedia... Extend the first 16 ...

15 30 50 per page