# All Questions

539 views

### Expectation Value of the Index of Coincidence

Can Anybody tell me why the expectation value of the Index of Coincidence is the following? For a cipher text string of length $L$, where $n$ is the number of alphabet characters, $k_r = 1/n$, and ...
2k views

### Use of nonces in Kerberos and Needham–Schroeder protocols

Can you please explain me what is the reason of using nonces in the Needham-Schroeder and in the Kerberos protocols for Key Transport. In particular : Can you explain me the use of $N_A$? And ...
81 views

### Incorporating known ciphertext into new message

Which ciphers $c_k$ enable one to define a joining function $f_{c,k}$ such that: $$f_{c,k}(c_k(p_1), p_2) = c_k(p_1 + p_2)$$ That is, the result of joining some known ciphertext $c_k(p_1)$ with a ...
492 views

### How to represent a 32-byte SHA2 hash in the shortest possible string?

I'm calculating a SHA2 hash of a certain sensitive key value. I need to store files on disk using this hash a directory path prefix. So lets say I hash the key value 150023, I get a 32-byte value ...
120 views

### Tips on conceiving safe software messaging platform

I have a personal project in mind in which I plan to use cryptography in order to let the users be confident in the fact that, even if all data get's stolen, it would be virtually impossible to crack ...
449 views

### Brute forcing Cardan grille

Having a "rotating" square Cardan Grill with sides long n cells, how could i determinate the cost of a brute-force attack? How many configurations should be considered to perform an exhaustive ...
277 views

### Twofish key length

I'm using twofish. Say you have a 120 bit key, is there any difference in using a 128 bit bit keylength or a 256 bit one? Since the most significant digits of the key will be allo zero in both cases, ...
544 views

### Is this fixed length MAC unforgeable?

Consider the following fixed length MAC for messages of length $\ell(n)=2n-2$ using a pseudorandom function $F$: On input of a mesage $m_0||m_1$ ($|m_0| = |m_1| = n-1$) and a key $k \in \{0,1\}^n$, ...
137 views

### How is the password sent across for verification?

I am familiar with Challenge-Response Authentication scheme. However I would like to know actual message content sent between client and server for 1 way authentication, over an insecure channel. ...
658 views

### iSeries (AS/400) Database File: password encryption

I am helping with a project in which an old software system on an iSeries is having a brand new .NET UI applied to it. It's going well... except... In order to allow users to login and maintain ...
38 views

### Key sizes supported by 3DES

I read about 3DES encryption but I don't understand exactly what the specific meaning of key size is. For example I found that 3DES supports 64, 128, 192, and 256 bits key size. What are all the ...
54 views

### Regarding NTRU homomorphic properties

NTRU has some homomorphic properties modulo q, supporting both addition and multiplication. Due to its nature, it cannot support many of them. My main focus currently is in the addition, so the ...
63 views

### NTRU Encryption

It's using Euclidian inverse. Can you show it step by step? $$N=7, q=11, a = 3+2X^2 -3X^4 +X^6$$ the inverse of $a \pmod {11}$ is $$A=-2+4X+2X^2 +4X^3 -4X^4 +2X^5 -2X^6$$ How do we compute $A$?
46 views

### Replacing the PRF in PBKDF2 with Keccak

I am unable to find a reliable, tested library for a decent password based key derivation function e.g. Scrypt in the programming language I am using, but I have a reliable library for PBKDF2 (which ...
51 views

### Is it safe to prefix the a key with a known value?

Almost every encryption algorithm is based on a secret key. I wonder when the algorithm is considered safe, does that also imply that I can prefix (or suffix) the key with a known value, as long as ...
20 views

### Determining nonce between unsynced systems

It's my first venture into cryptography, and I'm struggling with how to use a nonce in an encryption standard between two digital radios. The two radios support AES encryption, only requiring a ...
32 views

### Security of integrity protection with HMAC vs AEAD

I'd like to know how the security of the integrity protection compares between: HMAC-SHA-256 with an 32 byte tag or a truncated 16 byte tag AES-GCM with a 16 byte tag AES-CCM with a 16 byte tag or ...
50 views

### Koblitz encoding a message to a point, what is the “associated auxiliary base parameter”?

I am looking at the Koblitz method for encoding a message as an elliptic curve point. The first step given in the paper I'm reading is: "Choose an elliptic curve and its associated auxiliary base ...
62 views

### How does ccrypt work?

On many Linux/GNU distributions CCrypt (ccrypt) by Peter Selinger is available as a command line utility to encrypt files. How does the protocol work and is it ...
58 views

### ccrypt and its security

I would like to know how secure is ccrypt to encrypt files (like images, videos and other non-plain text data) using single password of 20+ chars length. It uses Rijndael with 256-bit block size and ...
55 views

### Send an encrypted question and return answer without decryption

Oke bear with me for a minute. Once upon a time someone mentioned a hypothetical way where you would send an encrypted question to Google and Google would return an answer without decrypting it. As ...
35 views

### LUKS multiple key slots - what's the intuition?

LUKS volumes have the ability to allow multiple independently usable passwords, as explained here: [https://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions] The intuition behind basic ...
163 views

### Is cryptanalysis of CTB-Locker really impossible?

It seems that CTB-Locker make a lot of victims nowadays, and yet, the full encryption scheme of it is now publicly known [1,2]. Would any of you could find a weakness to exploit in this encryption ...
71 views

### IV's for different AES encryption modes

I wanted to know if my understanding is correct! I have been reading up on aes encryption and modes(specifically CTR and CBC) and it took me sometime to understand the concept of IV. If the IV is ...
52 views

### How to store and use a Cryptographic Seed in a database [closed]

Companies such as Barclays use cryptographic seeds (for their PINsentry system), RSA do the same for RSA SecurID, but how do they safely secure the seeds in the database. With passwords you just hash ...
47 views

### How does the attacker include input before compression and encryption in CRIME?

I have read this article about the CRIME attack against TLS and SPDY. The article says that: What is not yet clear is how the attacker is including their input in the source material before it ...
115 views

### Diffie-Hellman Application

Alice and Bob want to perform a Diffie-Hellman key exchange using the group $G$, a primitive root $g$, Alice’s secret key $k_A$ and Bob’s secret key $k_B$. In each case below compute the element of ...
120 views

### CBC-MAC: is it secure to authenticate a fixed length ciphertext?

Suppose I have a fixed-length arbitrary ciphertext. To authenticate such ciphertext: I generate a random AES Key $K_{auth}$. Then I compute the CBC-MAC Tag of the ciphertext with $K_{auth}$. ...
75 views

I have recently been playing with Chacha20-Poly1305 with libsodium, and all of the examples state the additional data portion of the tag is stored in plaintext when encrypted. But from what I can tell ...
72 views

### Can you exchange a shared key without any hardness assumptions?

Imagine that P=NP, and one way functions don't exist. Can two people end up with a random shared key of arbitrary length, if every exchange is public? They have true RNGs, and know who they are ...
42 views

### Automatic generation of secure passwords with the least inconvenience for a user

I'm working on a web site for a private company that should allow them to upload files, which will be later retrieved by their affiliates. The site will be available from a public Internet using ...
42 views

### ElGamal and Schnorr groups

As I gather, a normal practice for choosing a cyclic group for ElGamal key generation is to find a safe prime $p$ and use a multiplicative cyclic group with modulus $p$ and order $q = (p-1)/2$. ...
83 views

### Simple message authentication code

I used to figure that message authentication codes function like digital signatures: a hash of a message is calculated and then encrypted with a secret key. To verify the authenticity of a message, ...
131 views

### open source whitebox-crypto implementation

I am trying to code a simple WBC situation to help my understanding about white-box cryptography. Details: I have 2 programs, a "server" and a "client", the server utilises caesar cipher (key = 2) ...
44 views

### Confused with the role of AES round keys

AES works when each plaintext block is arranged in a 4x4 array of bytes called states. State goes through 10 rounds of encryption consisting of 4 operations: bytesub, shiftrow, mix columns and add ...
30 views

### TimeStamp in Cache-time attacks on AES [closed]

I have recently read about AES cache timing attacks. More specifically, I read Daniel Bernstein paper Cache-timing attacks on AES. I have a question about the code in Appendix A: ...
85 views

### What is the importance of adding round key in AES

I know this may not be the place to ask this but I have found it difficult to find an answer to this question. I know the steps of the AES encryption algorithm but I am finding it difficult to ...
27 views

### Effect of CFB IV reuse

If an Initialization Vector (IV) is reused (under the same encryption key) in Cipher Feedback Mode (CFB), what is the effect upon security? I know there is some negative effect upon security, but I ...
104 views

### Key derivation of public key without knowledge of private key?

I'm looking for a convenient way to share a set of public keys across multiple services, while preserving privacy by preventing these services from tying the identity of these public key sets together ...
94 views

### What is the algorithm behind PasswordDeriveBytes?

Microsoft has created an implementation of PBKDF1 in the PasswordDeriveBytes class. It can however generate more bytes than PBKDF1, which is limited to the number ...
118 views

### How to roll my own hardware RNG?

I am considering building a hardware RNG myself using cheap parts. Is this a good idea and safe enough? Random sources: amplified Zener noise from one randomly chosen ...
71 views

### Post processing of AAD and len A||C in a hardware AES GCM implementation

I'm new to GCM and I need to implement it in hardware, using FPGA. The data bus is 640 bits, so I will use 5 adder/multiplier blocks in parallel. The message size and AAD size are constant. My design ...
97 views

### Luby-Rackoff on Feistel ciphers [closed]

On page 46 of these lecture notes, it seems to say that if we have a Feistel cipher, and plaintexts $(L_0, R_0)$ and $(L_0^*, R_0^*)$ with corresponding encryptions, then we can determine the key? But ...
84 views

### test vectors for 3DES seem to in fact be testing DES - not 3DES

NIST SP 800-20 Appendix A has what presumably are supposed to be test vectors for 3DES except almost all of the test vectors utilize 8-byte keys and not the 24-byte keys that 3DES is supposed to have. ...
61 views

I figured that a really secure password would be an AES 128 key. If this key were to be base 64 encoded, I could replace 4 random bytes in it in order to make it unusable unless you know which bytes ...
71 views

### Perfect secrecy of a crypto system

Suppose we have the following crypto system: $P = C = K = \{0, 1, . . . , n − 1\}$, $E_k(x) = (x + k) \bmod n$ and $D_k(y) = (y − k) \bmod n$. Prove that the crytosystem has perfect secrecy. Perfect ...
64 views

### RSA Protocol behind Yaksha Security System

So I'm reading over the Yaksha Security System and see it is based on the RSA cryptosystem and a centralized server, easy enough. What I'm slightly confused on is the math behind the related keys. It ...
78 views

### Why do we have fixed output length in the algorithm SHA1

Why do we have fixed output length in the algorithm SHA1 . is there any explanation about that