# All Questions

2k views

I'm conducting an experiment dealing with differences in padding across different aes operations for my Intro to Crypto class, and the question says OpenSSL uses PKCS5 padding, and that I need to ...
758 views

### probability of N hash digits colliding

What is the probability of the first N hash digits colliding? for example i made a script that appends the first 5 digits of the file's sha1 hash to the name of the file. So will the probability of ...
273 views

### Proving HMAC collision probability bounds?

Could someone point to results or proofs about the probability of $$HMAC(k, m_1) = HMAC (k, m_2)$$ assuming the underlying hash function is SHA-256? Would those probabilities be higher/lower if $m_1$ ...
260 views

### Encrypting and Decrypting a 19-digits long BigInteger

How can I take a maximum 19-digits long BigInteger and encrypt it with the following rules: The result must be based on digits and lower-case English letters ...
193 views

### Is solving a modular linear equation a hard problem when the coefficient is not an invertible element?

Assume that we have a linear equation like this: $$ax=b \pmod n$$ when $x$ is the unknown, and $a$ is not an invertible element in $n$. is finding $x$ a hard problem? (by solving I mean finding an ...
456 views

### Properties of Ideal Straight P-Boxes

What properties should an ideal straight P-Box exhibit?
117 views

### AES 128bit round level recommendation

we don't want change standard just after every attack, now for AES 128bit blocks i think 16 round is secure, but what is best round amount ? we had attack for 7 round then 10 round and it going so on ...
718 views

### Is the AES encryption scheme CPA secure?

Give a 256 bit key space and 128 message space would AES block cipher as the encryption scheme be CPA secure?
664 views

### detecting ROT13/base64 encryption

Is there anyway to detect that a cipher is encrypted with ROT13 Or Base64 without decrypting it using the algorithm and check that the result means (works)? I mean does an algorithm exists that test ...
171 views

### Pseudo-random Number generation for Passwords

I am looking for a good pseudo-random number generation algorithm for passwords. My scenario is that I have to generate 5K pseudo-random bits from a user-supplied password (6 characters). What are ...
280 views

### Should I use md5 for my new application?

MD5 is a very fast hash and its output is short and easy to store. Should I use it for my non-security-sensitive application? I don't think so, but I can't seem to convince anyone else that this is ...
5k views

### How does one implement the Inverse of AES' MixColumns

I got an answer in the related question about Mixcolumn for encryption, but how about decryption? what will I do? Because it said that I will used this: During decryption the Mix Column the ...
291 views

### Factoring a polynomial over a GF [closed]

I have the following question: What polynomial, when factored over the field $GF (2^8)$ based on the irreducible polynomial that is used in Rijndael, will factor into all the polynomials in the ...
37 views

### Why the $IV$ used in Merkle-Damgard has to be fixed to a specific value?

I just can't figure out why on earth the $IV$ in Merkle-Damgard has to be fixed (that's what the Katz-Lindell book says)? Because even if you choose it randomly from say $\{{0,1}\}^n$ then the ...
38 views

### Algorithm for factoring a number $n$ of a specific form given $n$ and $\varphi(n)$

Given the natural number $n$, which is in the form $p^2 \cdot q^2$ with $p$,$q$ prime numbers. Also $\varphi(n)$ is given. Describe a fast algorithm (polynomial time) that calculates $p$ and $q$. ...
91 views

### How many bits to flip in an RSA public key to do signature forgery?

Scenario: Alice wants to verify a signature from Bob. Alice knows Bob's RSA public key (e, n). However, Alice is getting the data, the signature of the data and the public key from an attacker Eve. ...
108 views

### Is this hypothetical key-exchange secure?

I've thought about the following (generic) key-agreement protocol. The only weaknesses I could have found are missing freshness guaranteees. As for the notions: $E^1_K(P)$ is the symmetric encryption ...
68 views

### In what cases will RSA not work? [duplicate]

I know that there are cases when RSA will not work like when the number to feed into the system is greater than the modulus. I was wondering if there were any other cases when RSA won't work I looked ...
45 views

### How to determine the exponent when using RSA

Can someone please explain to me how, when using RSA, to determine the exponent to be used in encryption and decryption? I have attempted a worked example on using RSA (shown below) but I can't ever ...
35 views

### is this possible to use asymmetric encryption schemes as order preserving encryption

Are we able to use order preserving encryption in asymmetric schemes, is this work efficiently. is this secure at any one of the situations
58 views

### What's wrong with an iterative (with counter) hashed salted KDF?

It seems like the brain-dead simplest KDF would have a key-stretching structure that is not substantially different from $\text{hash}(S | P | S | P |\dots|S|P)$, where $S$ is a salt and $P$ is a ...
47 views

### Physical entropy source: How many bits entropy per byte is sufficent?

8 bit / byte would be perfect obviously. head -c 1M /dev/urandom | ent gives ~ 7.9998 bits per byte. Now, if I have a physical entropy source, how much entropy ...
43 views

### Is randomsound for increasing entropy pool not doing what it is supposed to do?

I am using randomsound because I thought it would be a good idea to inject some additional entropy into the entropy pools of my linux machines (clearly those machines have a corresponding sound card). ...
68 views

### Brute Force on Key

If you are brute forcing a key and trying trillions of combos, how will you know when you accidentally hit the right answer? Clearly you can't look at each decoded answer to see which "looks right".
97 views

I have an application that I use sha3-512 to hash my password with a randomly generated 64 characters salt for each password. Is it bad to use this method to store passwords? I know many people ...
45 views

### Can Hill Chipher be considered as Asymmetric?

I know hill chipher is a block chipher ,We produce decryption key by inverse of key matirx but we still use different key for decryption. Therefore Can we say that Hill chipher is asymmetric chipher? ...
53 views

### Shamir secret sharing with field 2^8

I want to split a message using Shamir's Secret Sharing by splitting each byte of it so the field I'm using is $2^8$. Assume $(2,2)$ scheme, i.e., splitting it into $2$ shares and both of them are ...
92 views

Having shared a pad of length double the length of your anticipated message, splitting it into x and y. Then using x to encrypt the message, and using y twice to encrypt the next pad, would that be ...
43 views

### Would this method allow fast authenticated encryption using only a single encryption operation per block?

[This approach is flawed. A different speculative approach using an RNG instead of the cipher as a source of entropy was posted as a separate question] Assume $E$ is a block cipher, $C_0 = IV$ and ...
64 views

### What should I think about these unique certificate serial numbers [closed]

I was looking at the serial numbers of the certificates for www.google.com and wordpress.com. Wordpress was listed by openssl as: 04:0B:D4:F8:25:88:C5 This serial is listed as the serial for both ...
71 views

### Computational indistinguishability with Example

Based on computational indistinguishability definition no PPT algorithm can distinguish $X$ from $Y$, where $X=\{X_n\}_{n \in N}$ and $Y=\{Y_n\}_{n \in N}$ are ensembles of probability ...
84 views

### where should private and public keys be stored? [closed]

I am kind of confused whether should a newly generated key pair be stored in a keystore or in just a normal plain text file? From what I read from online source, there are serveral explainations ...
42 views

### FIPS 113 Computer Data Authentication

on the NIST website for Message authentication There is a mention of 2 approved algorithms, i am curious about the first one. the link to FIPS 113, Computer Data Authentication appears to be dead ...
109 views

### SHA-512 partial preimage

I was looking at how SHA-512 works, and I have a question. Imagine I want an input $N$ of 512 bits whose hash in hexadecimal starts with the digits 12345678. How ...
51 views

### Different keys for clients but 1 key on server

Is it possible to have different keys on alot of (embedded) devices and just have 1 key on a server (to witch all these devices connect)? The main point here being when 1 device is compromised this ...
77 views

### How is the MAC or HMAC secret shared with the other party for verification?

I've seen people everywhere say to use a MAC or HMAC with block ciphers. I think I understand the basics, but I'm still not sure how the HMAC secret is distributed so the other party can verify that ...
58 views

### Length of prime number used in Pedersen Commitment

I am writing a program using a Pedersen commitment scheme and all I'm missing is an appropriate length for my prime $p$. I have heard that a length of $2^{80}$ is ok, is that correct?
50 views

### Is $f\colon x\mapsto g(x+1)$ necessarily a pseudorandom function?

Let $l\in\mathbb N$ and suppose $$g\colon\;\{0,1\}^l\to\{0,1\}^l$$ is a pseudorandom function. Is $f$, defined as below, necessarily a pseudorandom function as well? $$f(x)=g((x+1)\bmod2^l)$$
68 views

### Altering the message space of Paillier

Is there any obstacle if we restrict in Paillier the plaintext values to be drawn from $\mathbb{Z}_N^*$ instead of $\mathbb{Z}_N$ as the original scheme indicates.
92 views

### What is the difference between chosen-plaintext attack and adaptive-chosen-plaintext attack?

I've just dived in cryptography and would like to learn basics of this science. Currently I can't understand the difference between these two types of attacks. As I understood from Bruce Schneier's ...
145 views

### Required key size for an ideal cipher with a 32 bit block size

For an ideal block cipher, what size key would be required when the cipher has a 32-bit block size?
59 views

### Will there always be 256 collisions for the output of the MD5 hashsum function for 17-byte inputs?

By my math, if you are inputting all possible 17 byte values, and the output is 16 bytes long, then there must always be 256 possible inputs that will result in each output hashsum. However, looking ...
93 views

### What makes this mixer function resistant to differential cryptanalysis?

I recently learned how differential cryptanalysis works, and decided to have a play around with testing various designs for resistance against attack. My testing algorithm is essentially to loop ...
52 views

### Bit commitment, two blobs with same bit, without revealing it?

Suppose we have bit commitment scheme: $n=p*q$ and $t \in QNR_n$, with Jacobi $(\frac{t}{n})=1$ Commitment(P), random $x\in \mathbb{Z}_n$, $y=x^2t^b$, where $b$ is bit. Ok, suppose we have $y_1$ and ...
110 views

### MAC in SSH packet encryption, benefits to not including it?

What are the benefits to not including MAC in a SSH packet encryption? I understand what the MAC is there for, but if it was not included would there be an advantage? Is the MAC somewhat redundant ...
68 views

### CCA-attack is possible in RSA, but how the decryption key $d$ is known to anyone

CCA-attack is possible in text-book RSA, but how the decryption key $d$ is known to anyone, as it is kept secret with receiver.
85 views

### What does variable-base point/scalar multiplication mean in ECC?

I am a bit confuse about the term, variable-base point/scalar multiplication, in Elliptic Curve Cryptography. What I have understood so far. It means that the base or point on EC is variable/unknown. ...
105 views

### Multiple keys for the same ciphertext [duplicate]

Say you have a plain text: How are you today? and you encrypt it so it becomes: LKD03Loel03skj1Q03 Now you have multiple people that need to know the plain text of this cipher text but ...