All Questions

400 views

Verifying Self-signed SSL Client Certificates

I have a service and I want to authenticate my clients using SSL client certificates. Now I want the key exchange process to be as simple as possible, kind of like SSH: You generate a keypair and ...
74 views

How are the lower levels calculated using upper levels in an optimized Merkel Hash Tree?

I was reading about the TIK protocol for thwarting wormhole attacks on adhoc networks. It uses a Merkel Hash Tree to store keys. But since the number of keys can be large, the tree is optimized by ...
299 views

Generating keys with HKDF from Diffie Hellman agreement

In order to generate multiple session keys from a Diffie Hellman key agreement protocol, I'm trying to use the HKDF to generate this session keys. The HKDF algorithm uses an Extraction-Expand ...
186 views

Privately Sum Values without Dealers, MPC

Suppose $n$ actors each hold a plaintext $p_i$. We wish to find $\sum p_i$, without leaking any information about individual $p_i$. Any actor (or any link in the network) could be controlled by an ...
171 views

Security of S/MIME in case of CA compromise

Suppose Alice and Bob are exchanging messages using S/MIME, protected by certificates that have been issued by either the same CA or by two mutually independent CAs. There exists an adversary Mallory ...
249 views

Key exchange and man in the middle issue. Secure solution

I am trying to design MiTM protected key exchange algorithm. For instance I am using RSA asymmetric keys. Alice and Bob respectively have each their own pair of keys. And they should be able to ...
114 views

Where can I double check my elliptic curve results?

I am trying to do some elliptic curve calculations by hand, just to refresh myself on how the system works. I calculated some points and did some operations by hand. I am trying to double check my ...
184 views

SHA256 Round Equivalence

I have calculated the average number of operations in 1 round of SHA256 as follows: Additions: 9.25 Bitwise Rotations: 9 Bitwise Shifts: 1.5 Bitwise AND: 5 Bitwise XOR: 10 I have certain ...
624 views

Discrete log problem with modulus prime

I am a bit confused on the hardness of the discrete logarithm problem. Does it become intractale only when it is mod n, where n is a large composite number (Like RSA key). What about if it is mod a ...
1k views

Achieving 256-bit encryption strength with PBKDF2 - HMAC-SHA1

I am interested in the theoretical consideration of the bit strength of an encryption key and its precursor. Assume a given environment as follows: a. My encryption algorithm is AES-256 b. My key ...
212 views

Is generating public key inevitably slow in classic Diffie-Hellman if the private key is large?

Let's say I pick a 3000+ bit prime $p$ for which I also know that $q = (p - 1) / 2$ is a prime. If I've understood correct, then I can pick pretty much any $g$. Is generating $g^x$ now inevitably ...
152 views

using random encrypted RSA challenge as key material

Assume a simple protocol for authentication - one side sends a randomly generated challenge string and encrypts it with RSA. The receiver decrypts it and replies with a hash of the challenge, proving ...
154 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 ...
591 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 ...
407 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 ...
2k 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 ...
408 views

RSA padding: what is it and how does that work?

If I am not mistaken, plaintext RSA is not secure. So, I have read that padding and hashing is needed to make the RSA algorithm secure. However, I am confused on what does padding or armoring mean in ...
216 views

Is this ECC encryption key sharing method okay?

Is this encryption key sharing okay to use? Or is much better to use ECIES? $G$ = base point $a$ = Alice’s private key $b$ = Bob’s private key $A = aG$ = Alice’s public key $B = bG$ = Bob’s public ...
196 views

Generate a new public/private key pair for each new message?

When using PGP type public encrypted communication, would it be a good idea to generate a new public for each message and attach that in the new public key in the reply to back to sender mail body? ...
149 views

Using plain Diffe-Hellman for server authentication with known public key

Other considerations aside, is it possible to use DH with an established public key (together with fixed g, p, q) to safely authenticate a server instead of using some signing algorithm? In other ...
201 views

Proof of work for determining whether a number is prime?

I have an idea for a system that would be outsourcing some brute force calculations to many users in hopes of finding divisors of a number. However, there is a possibility that a given number would be ...
608 views

How are Predicate Encryption algorithms implemented?

After a lot of reading on the internet, i can't seem to figure out how Predicate Encryption works. As i read, it consists of 4 algorithms: ...
397 views

inverse problem about scalar multiplication on elliptic curve

Let $E$ be an elliptic curve over a finite field $F_p$. Given $n$ be a positive integer and $Q$ be a point on $E$, assume that $Q=nP$, how can we find this $P$? We can assume that $n|p-1$. If $n$ is ...
1k views

AES encryption with multiple keys

I would like to encrypt some data using a combination of multiple keys. There would be two keys: a client keys that would be generated for each client and a single server/application key used by ...