# All Questions

110 views

### Best hash size for hash trees

I want to know if having a 8-byte hash value is better than 16-byte hash value for use within hash trees. My mind tells me that the shorter the hash value, the better. But doesn't a smaller hash ...
1k views

### Efficient Incremental Updates to Large Merkle Tree

I have a data set with 300 Million entries and every 5 minutes 4000 random entries in this table change. I need to calculate the merkle root on this data set to validate integrity multiple times ...
290 views

### What is the purpose of update() in popular hash APIs?

E.g., in Python's hashlib, update() basically merges in string buffer functionality into the object. Several other digest APIs I've seen have this pattern. Considering this adds functionality that ...
448 views

### Building a hard to factor number without knowing its factorization

It is possible to find an efficient algorithm for constructing a provably hard to factor number $N$, together with a witness that shows that it is indeed hard to factor. EDIT, since it was not clear: ...
1k views

### AES-SIV security

I am invesigating the AES-SIV (rfc 5297) based block cipher. The construction of the S2V is lying on the AES-CMAC and dbl and XOR operation. Given a AAD the size of L and in the 128bit block ...
891 views

### Compare two hashes with different salt

I'm storing the salted hash of a credit card number in a database. What I'd like to be able to do is determine if two different entries in the same database correspond to the same credit card. ...
162 views

### Probability for collisions of a one-way compression function

Given a one-way compression function $h:\{0,1\}^n \rightarrow \{0,1\}^m$ and an attacker that picks $x_1 \ldots x_t \in \{0,1\}^n$ (uniformly distributed), I have to show that the probability to find ...
333 views

### The probability of finding a limited set of collisions for HMACSHA256

I need some input on the use of HMAC-SHA256 in an open source project, any help appreciated. The problem I'm solving is session fixation. We have a username, for that username we'd like to generate a ...
630 views

### Review of AES encryption concept for an open source project

i'm working on an opensource project, A generator for static (html/js), password protected photo galleries. The generator AES 256 encrypts many images with the same key in PyCrypto, and decrypt them ...
62 views

### CBC with random prefix but no IV - secure? [duplicate]

I'm looking at a datagram-based protocol that encrypts a payload. The payload is encrypted with AES or blowfish in CBC mode, and the result is then authenticated with a HMAC. To save space, the ...
384 views

### plaintext and its encrypted version known [duplicate]

I have a (long) text in two versions, encrypted and plaintext. I think it was encrypted using a substitution cipher method (I'm pretty sure, indeed). I'm not good in this matter, I know little about ...
4k views

### How does SafeNet MobilePASS generate passwords?

We use MobilePASS at work but the latest version of the android client seems to be buggy so I wanted to have a go at implementing the algorithm myself. You can download the client to play with here: ...
627 views

### Is OpenPGP vulnerable to the “crypto doom principle”?

From reading RFC 2015 (MIME security with PGP), and from looking at the raw format of (GnuPG) encrypted and digitally signed email messages, it seems that first a signature is calculated from the ...
324 views

### IV and Headers inside cipher text

I am a bit confused about the use of IV, and key hash. Is the key hash and IV stored inside the headers of the cipher text? Isn't it a security risk to store this header information? By key hash I ...
246 views

### Which area of Maths should I pursue?

I would like to know which area of Mathematics would be most beneficial to cryptography. Surely Algebraic Number Theory and maybe to a lesser extend, Elliptic Curves, are closely linked to ...
159 views

### Merkle path authentication

In point 4 of the Algorithm 4.2 (Classic Merkle Tree Traversal) of *"Post_Quantum_Cryptography.pdf"* shows *"Stack_h.update(2)"* each stack receives two updates. I am trying understand to understand ...
448 views

### Asymmetric format preserving encryption?

I would like to encrypt a string asymmetrically. I would like the ciphertext to be as short as as plaintext. (or shorter) I've read about format preserving encryption functions - are there ...
797 views

### Homomorphic Encryption

Homomorphic Encryption (HE) which supports any function on ciphertexts is known as Fully Homomorphic Encryption (FHE), while Partially Homomorphic Encryption (PHE) includes encryption schemes that ...
776 views

### Algorithm for proving Carmichael numbers

I have an application for determining if a number is a prime or not, currently I'm getting a random number, then doing the Fermat primality testing to find out if the number is probably prime (so this ...
251 views

### Selecting bijective functions for permutations

How would one go about selecting an appropriate bijective function for introducing permutations into a cipher or hash? For example, $f(x) = x+1 \space mod \space n$ is a bijective function, but isn't ...
182 views

### What parts of AES encryption result are safe to pass on the network

I'm using AES to encrypt the message. both sender and receiver know the passphrase, but only sender knows IV and salt I assume that receiver also needs to know IV and salt to decypher text; is it ...
527 views

### Four-Square cipher and its keyspace

Am I thinking about this correctly? Consider that the keyspace of the Playfair cipher is equivalent to all permutations of the alphabet, e.g. the number of distinct permutations of 25 objects, and ...
3k views

### Creating a PKCS#12 file where public key doesn't match the private key

For testing purpose, I want to create a PKCS#12 file in which the private key doesn't match the certificate. Is there any tool which will help me do this? If I use ...
541 views

### Physical analogue for MACs

What would be a good analogue with which to describe Message Authentication Codes to a person who has little to no understanding of cryptography? For instance, a vault is a reasonable analogue for ...
335 views

### Difference between actual attacks and theoretical attacks on SHA cryptographic series

Could anyone tell me what the difference is between a theoretical attack (Like the one done on SHA-1) and an actual, practical attack (Like the one done on SHA-0)? Is a theoretical attack a proposed ...
358 views

### Stream cipher with Diffie-Hellman and Cryptographic Hash Function? [duplicate]

I know: Never do your own crypto. But this question is just theoretical. Assume you do a Diffie-Hellman Key Exchange with a server to produce a shared secret $x$. Then use a cryptographic hash ...
180 views