# All Questions

223 views

### Finding Elliptical curve points and encoding text using them

I recently got into learning Elliptical curve cryptography and are currently building a project in C#. Everything is working well so far, I can encode and decode points, and thanks to this forum I ...
95 views

### Is there an “additive” proof-of-work?

I'm trying to find a proof-of-work algorithm with the following properties: If A(1) is a proof of work with Difficulty(A(1))=n (requires n basic operations on average), then one can find a proof of ...
109 views

### To prove $r \cdot f_1 +f_2 \cdot (s+1)$ is secure

We define the polynomials $r, f_1,f_2,s \in R[x]$. Where $r$ is a random degree 1 polynomial and $s$ is a random polynomial such that: $degree(s)=degree(f_1)=degree(f_2)$, let $R$ be $\mathbb{Z}_p$ ...
75 views

### ASCII input to HMAC weaker than raw bytes?

In various cryptographic programs I've written (most have been toy problems, but this current one is not) I have taken a slothful approach to performing a message digest (hash) of numerical input. I ...
606 views

### what are the security benefits of LUKS?

Aremed with only basic crypto knowledge, I'm trying to understand the security benefits of LUKS over plain-mode dm-crypt. Hopefully this is a good place to ask. Given the LUKS header contains ...
87 views

### How can a good encryptor be made?

I am making an encryptor software for a stream cipher with my own PRNG as a project for an inter school science competition. How can I make one so that after it generates the pseudo random nos. it can ...
205 views

### Large file validation on an embedded system through hash and encryption

As a preface, I have to say that I am a noob in this area. Having said that, I will ask the question. I have a situation where I need to validate and protect against tampering a handful of large ...
960 views

### Format Preserving Encryption for 32 or 64 bit plaintext values

I am looking for a Format Preserving Encryption implementation to apply to either a 32-bit or a 64-bit integer. It looks like AES/FFX mode is just what I need in terms of established security ...
116 views

### Implementation of garbled circuits using RSA

I was just reading these notes on garbled (Yao) circuits and I just stuck trying to figure out how an implementation of Table 1 would work using RSA encryption. In RSA the public key is (n,e). So for ...
359 views

### Serpent 256bit key wrong round keys

Assume that we have this 256bit key: 15FC0D48 D7F8199C BE399183 4D96F327 10000000 00000000 00000000 On first 0-7 keys we can't apply formula wi=(wi-8 xor wi-5 xor wi-3 xor wi-1 xor phi xor ...
381 views

### Generation of N bit prime numbers -> what is the actual range?

Short version: When generating a prime number of N bits, should I draw random numbers from the range $[0 , 2^n]$, or $[2^{(n-1)} , 2^n]$? Context: I'm trying to implement a toy-version of RSA as a ...
78 views

### Committing Bilinear equation in Groth-Sahai framework

Groth-Sahai framework enables us to commit to QE, MSME, PP equations. Now, is the equation below committable in GS framework? A bilinear map $e: G_1 \times G_2 \rightarrow G_T$. $g_1 \in G_1$ and ...
367 views

### VKO GOST R 34.10-2001 (described in RFC4357), Key Agreement Algorithm. Looking for its implementation/detailed description/examples

VKO GOST R 34.10-2001 was described in RFC4357 Page 7 But the description is very poor. Here it is: This algorithm creates a key encryption key (KEK) using 64 bit UKM, the sender's private key, ...
132 views

### Help to understand the chameleon hash function?

Recently, I'm reading Non-Interactive Key Exchange, in the section 4.2(Towards a factoring-based scheme in the standard model,Page 10), the authors uses t\gets ChamH_{hk}(Z||ID;r);\\ Y\gets ...
271 views

### How can I map arbitrary group elements to unique integers without using Hash functions?

Let's say, I have a group $G$ of large prime order $p$. A set $S$ consists of $n$ random elements chosen from $G$. Without using a collision resistant hash function $H$, how can I map elements of $G$ ...
761 views

### SHA512withRSA - Looking for details about the Signature Algorithm

I am trying to find information about the Signature Algorithm SHA512withRSA and have been unsuccessful so far. In the current state, the signature is too long, so I would like to check the code for ...
122 views

### Generating S boxes that satisfy Coppersmith's criteria?

I'd like to generate all possible 6-bit to 4-bit S-Boxes that satisfy the criteria for S-Box design given by Coppersmith, but I have a few doubts: How many such S-Boxes are possible? Is there any ...
140 views

Padding oracle attacks are a huge nuisance when using CBC mode encryption without authentication. Wouldn't all those padding oracle attacks be avoided if we'd just use bit padding instead? Or is does ...
159 views

### Is multiple encryption using NaCL and TLS better?

In general, the idea of multiple encryption sounds interesting - for creating stronger cyphers (especially against implementation bugs), one could always get the configuration details wrong and mess ...
213 views

### Prevent MITM attack while encrypting data by using ElGamal ECC?

I am using ElGamal ECC to encrypt my plain text data. I want to ensure that my data is safe from a Man-In-The-Middle attack. What methodology I can adopt to achieve this goal? How can we prevent a ...
90 views

### How can finding a collision help an attacker with tampering messages with HMAC

As stated in the HMAC RFC (RFC 2104): The strongest attack known against HMAC is based on the frequency of collisions for the hash function H. How can a collision benefit an attacker? I would ...
200 views

I recently came across an interesting paper detailing the use of hardened session cookies. Each cookie includes a preimage of the password hash, and the preimage is hashed once more and compared to ...
112 views

### Encryption method with master key and user keys

I am working on a concept for a game that in the end will allow data sharing via plain text, but I would like to give the user the option of encrypting the data so that other players cannot modify it, ...
115 views

### Construct block cipher from a smaller one with mixing function

I read about the AEZ encryption scheme as presented at the CAESAR competition. To me it seems like a construction of an arbitrary length block cipher from a smaller one. The key component is the ...
111 views

### Cryptanalysis of Nonlinear Table Lookup

I am trying to derive a symmetric key based on a master key, combined with a simple string. Based on my limited knowledge, it seems that something like PBKDF2 would do that for me in a well-defined ...
173 views

### Are there any cryptographic flaws in my webhook signing process?

Out of band my services have exchanged secret keys. These secret keys are then used to prevent two things of the webhooks (HTTP calls triggered by Service A to Service B when an event occurs in ...
158 views

### Straightforward method for hampering frequency analysis on deterministic encryption

I'm brainstorming some different ways of making deterministic encryption more secure. I want to use deterministic encryption to preserve searchability over the keywords in a document set. However, I ...
89 views

### run length testing [closed]

Looking for guidance/references with/about calculations: I am designing a widget that creates N-bit binary sequences. My customers target spec for the sequence's minimum entropy is X bits/bit. I plan ...
86 views

### Composing and Inverting Symmetric Encryption Keys

Using a symmetric encryption algorithm $E$ on a message $M$, users usually send $E(M)$ to the recipient and then the recipient will compute $E^{-1}(E(M))=M$ to retrieve the message. For what symmetric ...
285 views

### ECDH anonymous key exchange to avoid PKI

I want to use TLS to encrypt the communication between peers in a P2P network. Each peer has a well known 256bit peer identifier (the public key of a 256bit elliptic curve keypair). Both peers need ...
78 views

### Should I calculate two CMACs over two different strings that share common bytes?

I am trying to secure my RF communication in which one RF package consists of two separate segments. I need to make sure that one segment of one packet is not replaced with a valid segment of some ...
2k views

### Probability that two different files can have same MD5 hash for both an unencrypted and encrypted version (AES256, same key between files)

This math is way over my head, and don't even know if it can be done, but here are the assumptions: Take unencrypted File [Fu] of variable length, but assume 100KB as an example. Let File [Fe] be ...
100 views

### Is it possible to deduce the value of a string when given its hash and multiples hashes of the string + other known strings?

To be clear, I have access to $H(S)$ and as many $H(S||K)$ as I want. Every string $K$ is known. Can I use the extra information to my advantage and try to deduce $S$, without requiring bruteforce? Or ...
113 views

### Comparing n-multiple amount of merkle trees?

I would like to know what best steps are there in finding differences between a high order amount of merkle tree's or if a better associative structure should be used. I ask this questions because ...
515 views

### CBC-MAC length extension attack with IV simulation

I'm doing Matasano's challenges and struggling with second part of 49th problem where I'm asked to do the length extension attack with CBC-MAC without IV manipulation. There is a hint that I can ...
165 views

### Getting 88bytes cipher output from 48bytes input in AES

The other day I saw this Hybrid Cryptographic Algorithm in the Google and felt curious about it. I am trying to understand this Hybrid Algorithm. And hopefully its not so hard to understand whats ...
68 views

### Is there a deterministic number generator that allows me to share some (not all) numbers I've generated using a smallish seed?

I was just wondering, is there a type of deterministic number generator that allows me to share some (not all) numbers I've generated using a smallish seed? I have pairs of random numbers and need to ...
241 views

### Where do I truncate the bits in SHA 256 hash algorithm?

I'm implementing SHA-256 in PHP using strings. Where do you truncate in the algorithm? There are a lot of places where there's binary addition happening so the number of bits in $W(i)$ keep ...
182 views

### Is a collision attack possible on MD5 if message is known partially

Is it possible to find $m'$ such that $\operatorname{MD5}(m'||m_1)=\operatorname{MD5}(m_1||m_2)$ if I know $m_2$ and $\operatorname{MD5}(m_1||m_2)$? Is this a collision or a preimage attack? Also in ...
102 views

### Use additional keys to thwart key compromise?

Is it good or bad practice to design crypto protocols for key compromise by using additional keys? Argument for bad practice would be: When you have a key you should trust it and not throw more keys ...
889 views

### RSA: Fermat's Little Theorem and the multiplicative inverse relationship between mod n and mod phi(n)

I'm learning about the proof of the RSA encryption algorithm, and I'm clearly fudging or missing something, because for me it doesn't add up. When generating keys for RSA encryption, we make sure ...
51 views

I have a question about linear block erasure codes that are described in this paper. I briefly describe the idea behind the linear erasure codes and then I ask my question. Given a set $d=\langle x_i ... 1answer 525 views ### Security of the iterated Hill Cipher I can understand that the basic Hill Cipher is susceptible to known plaintext attacks, but suppose the Hill Cipher is modified into the Iterated Hill Cipher. For a plaintext$x_0=m_0\$ and an ...
704 views

I'm relatively new to encrypting, and I have some questions. I intend to write a standalone C# program that will write and read an encrypted file with sensitive data using a password entered by the ...
237 views

### Illustrate NTRU using lattices

I studied some papers related to NTRU. All these papers describe NTRU as a lattice based cryptosystem but I could not find any paper which illustrates NTRU algorithm from lattice point of view. It ...
94 views

### Why would splitting a password output be better than separate HMACs for encryption/authentication key derivation?

In a recent question I asked here on crypto.se, an answer was given that surprised me a bit. As mentioned in the referenced question, I'm looking to derive encryption and authentication keys from ...
398 views

### Message lengths with AES CTR mode?

Im working on my own AES implementation as a personal educational exercise (not for production use), and a book im using as a resource states: In the case of CTR, we are merely XORing the output ...
807 views

### Value of “counter” when decrypting AES in CTR mode?

If – when using AES in CTR mode – you decide to use the setup where you combine the IV and the block count value into a single value, as suggested here, the first 12 bytes are your IV and the last 4 ...