# All Questions

75 views

### What is the proper way to generate a fixed length key from a variable length password?

The password is entered by the user and the key is processed locally. Neither the password nor the key will be stored, only used and forgotten (but hopefully not by the user). Is SHA256 by itself ...
76 views

### How much of Probability do I need to know to study Cryptography?

I have just started MSc in Computer Security. I didn't study probability before. Now, I have some short time to complete my MSc semester. What are the minimum topics from 'Probability' do I need to ...
63 views

### How to encrypt a vector $e\in Z^{m}$ using LWE

I have a vector $e \in Z^{m}$, now I want to encrypt it by using LWE (Learning With Errors). Because in LWE, we have to encrypt of a bit $\{0,1\}$. How can I encrypt a vector $e \in Z^{m}$? Thank you ...
61 views

### Randomness in generation of Virtual Machines from pre-built Image [closed]

I am studying Multi-Tenancy vs. Virtualization, and I got thinking about randomness, true randomness, virtualization etc, and I couldn't find anything on it. From what I gather, ...
101 views

### Affine transformation in AES: Matrix representation

I know that the affine transformation of the AES can be represented both as a polynomial evaluation over $\operatorname{GF}(2^8)$ and as a matrix-vector multiplication (see, e.g., p.212 C.4 of The ...
60 views

### New to cryptology, studying key exchange

I'm just getting an overview of some of the concepts in key exchanging at the moment, and I'm a bit disoriented on a few topics, namely key stretching, key derivation functions and perfect forward ...
67 views

### uniform vs. non-uniform PPT

I'm trying to understand PPT and in particular what the differences are in uniform and non-uniform PPT's. First, this is how I see it: A Probabilistic Polynomial-Time algorithm A is an algorithm that ...
71 views

Suppose to have a function for numbers expressed in 8-bit $\in [0,2^8-1]$ defined as: $$f(x)=x||x||x||x$$ where $|f(x)|$ is exactly 32 bits. e.g., suppose x=2 (00000010) so ...
56 views

### chaining multiple key derivation functions together

I was looking at PBKDF2, bcrypt and scrypt as options for key derivation; and would like to try using them all together in order to get the cryptographic strength of the strongest one (which seems to ...
175 views

### RC4 , Is it possible to find the key if we know the plaintext and ciphertext?

Is it possible to find the key if we know the plaintext and ciphertext with RC4. How should I write the algorithm?
58 views

### HMAC tag to verify the key (verification in the reverse direction)

A quick question. Are there any problems with the following HMAC use-case: We have two entities ($A$ and $B$), both of them have a secret ($A$ has $S_0$ and $B$ has $S_1$) $A$ generates a random ...
75 views

### What practical uses can random hash collisions be put to?

Using magic, I've built a machine that instantly generates hash collisions. To try it out, I set the dial to SHA256 and typed in "e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a". I ...
59 views

### RSA Decryption from samples

I am working on a project for a client which involves decryption of data which was encrypted using RSA. The system in question retains three independent copies of each data-set, but each copy is ...
121 views

### Rijndael S-boxes: Where do the $\mu$ and $\nu$ polynomial ring elements come from?

I've asked some other questions before about Rijndael's S-boxes, and step by step I'm coming to an understanding; but those steps often guide me to new questions. I did some lines of code to ...
94 views

### How do you break encryption on a message? [closed]

This may seem like a simple question, but I have just started studying cryptography and I can't seem to find any information on this at all. I am trying to write a "simple" encrypted messenger using ...
24 views

### Reordering of multiple signed blocks

I would like to refer you to page 430 of the Handbook of Applied Crypto, where the authors said "... reordering of multiple signed blocks presents a security risk..." This statement was made in ...
47 views

### Workaround to implementing Forward Secrecy

In the case where I am self-signing my digital certificates, if I just change my certificate (generate a new one) every week or month, will this have (sort of similar to) the same effect as ...
150 views

### CTR HMAC SHA256 implementation

After trying to invent my own AES mode, I decided to just implement something that's known to work, namely CTR with HMAC SHA256. From what I understand, I can use the IV as a counter, and the IV ...
103 views

### Keeping the key and IV safe when AES256 encrypting publicly known data

I am encrypting some publicly known data, and some private data using the same key, using AES256 with CBC. An attacker does not have the ability to choose what the public data is. Is this safe? (It ...
77 views

### Find the prime factorization in the DLP

Suppose we have $g^x \equiv h \pmod N$ Where $N = pq$ and $p$, $q$ are distinct primes. Also $(p-1)/2$ and $(q-1)/2$ are primes. If we know what $x$, $g$ and $h$ are, is it possible for us to know ...
152 views

### How to compare between two cryptographic algorithms in terms of security? [closed]

How to compare between two cryptographic algorithms (e.g. SHA-1 and SipHash) in terms of security? That is, how could one prove that algorithm X is more secure than algorithm Y?
77 views

### One-one correspondance complete function

I am reading the paper by John B. Kam and Georges I. Davida (1979) titled Structured Design of Substitution-Permutation Encryption Networks. On page 749 it reads ...
67 views

### Are there cryptographic schemes that mask as unencrypted traffic?

Are there cryptographic schemes that make encrypted traffic look like unencrypted traffic?
72 views

### Would the Fiat Shamir identification scheme be more secure if I design it with an exponents higher than 2?

Let's say both Prover and Verifier would use nth power instead of 2nd when creating public keys and when verifying. I know it would slow it down but would that cause the protocol to be more secure?
109 views

### Drawback of ElGamal encryption

I am trying to find out some disadvantages of ElGamal cryptography but I'm not able to figure out what's wrong with the algorithm. The only one I found is that a known-plain text attack is possible in ...
76 views

### Solve the congruence using Pohlig-Hellman algorithm

Use the Pohlig-Hellman algorithm to compute a solution to: $3^x\equiv 2 \pmod {65537}$ My attempt: $p-1 = 65537-1 = 65536= 2^{16}$ $x= 2^0x_0+2^1x_1+2^2x_2+...+2^{15}x_{15}$ For $x_0$: ...
76 views

### Schnorr's identication protocol

Schnorr's identification protocol is said to be a honest verifier zero knowledge protocol. Does it imply it will not work if the verifier is dishonest? I'm wondering if this is the case, it would ...
59 views

### Linear Recurrence, keystreams, and periods

I am trying to understand the following problem: Consider the following linear recurrence over $Z_2$ of degree four: $z_{i+4} = (z_{i+3} + z_{i+2} + z_{i+1} + z_{i}) \bmod 2$ i >= 0. ...
113 views

### Convert numeric message from RSA ciphertext to alphabetic

I have a set of numeric values that are supposed to represent a message encoded via textbook RSA. For example: 60889 37946 13359 61629 35960 13747 I've decrypted ...
100 views

### Why would using a random seed with other variables be bad for ecrypting if you can't guess the key?

I asked this on stack exchange with it being code based, but someone suggested to ask here. Basically, I've done a script in python and wanted an option to encrypt the input, but I couldn't get any ...
46 views

### Implications of reversing CBC encryption

What would be the security implications if we reverse CBC encyption? Here is a picture of CBC encryption: Here is a picture of CBC decryption: My guess is that the encryption would work if we ran ...
48 views

I built a system that allowed users to generate an unlimited number of email addresses. Instead of storing each one in a db, I created addresses dynamically and made the address an hmac signed ...
153 views

So I have to answer these questions, but I honestly have no idea what I am doing or where to begin. Can I get some advice on how to tackle these? Consider a PRP candidate function $f$ on $K = X = ... 1answer 218 views ### How many attempts does it take to crack a 32-bit password hash with this scenario? How many attempts does it take to crack (match) a 32-bit password hash from a database of 4 million password hashes? Correct me if I'm wrong, but to crack a 32-bit password hash would take roughly ... 1answer 82 views ### Is it necessary to encrypt nonce in cryptographic communication? Server and client have a pre-shared key K. Assuming that that pre-shared key is safe, so nobody other than server/client can encrypt/decrypt. Client sends a nonce N to server, server then sends back ... 1answer 52 views ### Requirement for the exponent generation during DH protocol [duplicate] The setting is classic DH protocol. Alice computes$A = g^a \bmod p$. Alice then sends$A$to Bob. Then Bob will send$B = g^b \bmod p$to Alice. Are there any requirements for the values$a$and ... 1answer 164 views ### Symmetric mutual authentication with client using a derived secret I'm attempting to find a client/server authentication protocol that allows the client and server to authenticate each other when the client doesn't know the server secret but does have a sensitive key ... 1answer 124 views ### Java RSA Padding: no libraries used I'm trying to implement RSA without using any java libraries using the algorithm from wikipedia HERE So, anyone can clearly see that it is a raw RSA, and can directly be attacked. The question is ... 1answer 83 views ### Prime modulus for RSA and sharing a secret? According to this paper entitled "Using Commutative Encryption to Share a Secret" they define their modulus to be a large prime p, which is public. Both exponents are private in this case. According ... 1answer 50 views ### Stream cipher key length to send I was being argued that stream cipher's key that is the length of the message must be sent to the destination for them to be able to decrypt the message. My point is don't you only have to send the ... 1answer 70 views ### Weak Boneh-Boyen Signature in Composite order group In the paper Ring Signatures of Sub-linear Size Without Random Oracles, authors have remarked that the scheme is instantiable in composite order setting, too. I am attaching the following reference ... 1answer 41 views ### Using Permutation polynomial to compute a MAC Is the following MAC secure? For a block$y_i$in a file, we defined a MAC as follows:$Mac_i:PRF(k,i) \cdot g^{y_i \cdot r_i} \bmod p$. Where$p$is a prime number,$g \in \mathbb{G}$,$PRF(k,i)$is ... 1answer 51 views ### How do you derive the lambda and beta values for endomorphism on the secp256k1 curve? You can see a little background about this on this bitcointalk post by the late Hal Finney.$\beta$and$\lambda$are the values on the secp256k1 curve such that:$\begin{align} \lambda^3 &= 1 ... 1answer 176 views ### What is the difference between a hash function and a pseudorandom function? [duplicate] Read the title. I've seen in RFCs that some MAC functions are called "pseudorandom functions". What are those? How are they different than hash functions? Why can't a hash function be used instead? 2answers 123 views ### Multiple encryption of part of block Is there any security risk in encrypting parts of blocks twice? I'd like to get around block sizes and make encrypted messages just as long as the unencrypted ones: Block 1: Byte 0 - 7 Block 2: Byte ... 1answer 89 views ### XOR cipher with three different ciphertexts and repeated key, key length known. How do I find the plaintexts? Let us say we have three different plaintexts (all alphabets, A-Z):x$,$y$and$z$, each of length$21$. Let the key,$a$, be also of length$21$. Now, what we have is$x \oplus a$,$y \oplus a\$ ...
88 views

I'm trying to solve a question about one time pads but I'm not sure if my assumptions are correct. I am to assume that I have a one time pad with perfect secrecy. This one time pad is used to ...
55 views

### Is there a reference that prove that the AES Key Schedule generate random looking round keys?

Starting from uniformly random generated AES master key, is there a reference that prove that an specific roundkey can be considered as uniformly random generated as well ?