Design of cryptographic primitives (algorithms), like block ciphers, stream ciphers, random-number generators, hash functions, MACs, key exchanges, public-key encryption or signature schemes. Also tag with the relevant type of primitive. If you ask about a known existing algorithm, also tag with its ...

learn more… | top users | synonyms (1)

3
votes
0answers
17 views

security of Even-Mansour scheme with keyed shuffle

I was researching the Even-Mansour scheme and had a question that wasn't addressed in the paper that I saw, and google was minimally helpful. What if a permutation that uses secret data like the ...
3
votes
0answers
29 views

Publishing only items your subscriber previously subscribed to, without you knowing which those items are

Let's say you were given a dump from a security breach. You want to share the email addresses affected by the breach with a separate company who pays you for this service so that they can protect ...
16
votes
2answers
2k views

Why is Pearson hash not used as a cryptographic hash?

The original algorithm produces 1 byte long hash and is (of course) not suitable for cryptography use. But according to wikipedia, it is possible and easy to produce Pearson hash of any length, ...
0
votes
0answers
16 views

Implications of pattern in finial digit of prime numbers [duplicate]

http://qz.com/639452/mathematicians-are-geeking-out-about-a-bizarre-discovery-in-prime-numbers/ What are the implications of this (very) new research on crytopgraphy? I would have thought this would ...
3
votes
1answer
81 views

Why inversion and multiplication operations are costly in elliptic curves?

There are several algorithms for efficient scalar multiplication of an arbitrary point P(x,y) by some positive integer k in elliptic curves defined over $F_{p}$ or $F_{2^{m}}$. The scalar ...
1
vote
0answers
61 views

Encryption & decryption of integers using modular multiplicative inverse and extended euclidean algorithm

I'm looking for a neat algorithm, which is capable of encrypting an integer to another integer and decrypting it again AND is secure. When I was in university, my professor showed me an awesome way ...
1
vote
0answers
60 views

Fast algorithm for reduction modulo a prime [closed]

If the prime is $p=2^a\cdot3^b+1$ , is there any fast reduction technique modulo this prime?
3
votes
1answer
49 views

Bitwise operation question with shifting involved

I am trying to find a value of X (32 bits) such that ((X XOR a)+b)<<3 = (X+c) XOR d. <<3 means shift left 3 bits. a,b,c and d are all constants which have been determined elsewhere. ...
3
votes
2answers
59 views

Non primitive lfsr sequence

Given a non-primitive LFSR sequence (i.e number of states is less than $2^n - 1$); how do we find out the the characteristic polynomial? Will Berlekamp-Massey algorithm work in this case? for example;...
2
votes
1answer
64 views

Distinguishing two sets of pseudorandom values when their keys differ by one

Suppose we use a pseudorandom function $PRF$ and a random key $k$ to generate a set of pseudorandom values: $\forall i, 1\leq i \leq n: w_i=PRF(k,i)$ Now, consider instead of picking a fresh key, ...
0
votes
1answer
67 views

Are any public key algos commutative?

Are there any public key encryption algorithms that allows for arbitrary ordering of crypto operations (commutative). That is, given a plaintext "message1", the following operations work to doubly ...
3
votes
0answers
44 views

How to make a “zero knowledge” cache/key-value store

I'd like to use a possibly insecure cache for storing expensive-to-calculate sensitive information. My requirements are: If the cache ever gets compromised it should reveal nothing about its ids or ...
6
votes
4answers
3k views

Does encrypting twice using the same block cipher produce a security weakness?

If I use the output of a cipher, for example a block cipher such as AES and encrypt it again with the same algorithm, I read that this introduces weaknesses into the overall security of the system. ...
24
votes
4answers
3k views

Are checksums essentially non-secure versions of cryptographic hashes?

Are checksums basically toned-down versions of cryptographic hashes? As in: they are supposed to detect errors that occur naturally/randomly as opposed to being designed to prevent a knowledgeable ...
0
votes
1answer
54 views

Difference between HMAC-SHA1(key, msg) vs SHA1(key + msg) [duplicate]

Is there any practical difference from using HMAC-SHA1(key, msg) vs SHA1(key + msg) as a way to verify the authenticity/...
1
vote
2answers
416 views

What operations are used in symmetric cryptography and why?

In continuation to Why are bitwise rotations used in cryptography?: what other operations are commonly used in symmetric cryptography? Are there particular operations on numbers that are good for ...
2
votes
1answer
79 views

Construction of division polynomials

I'm trying to understand the construction of the division polynomials used in Schoof's algorithm. I firstly followed this report of Charlap and Robbins. I stuck with the definition of the leading ...
1
vote
1answer
37 views

Secure way to hash a lookup value

I want to securely store a database table that consists of an account ID and a few columns of sensitive data. The data only has value if it can be associated with the account ID. My thinking is to ...
0
votes
0answers
53 views

Simulation of a custom build network security algorithm with ElGamal Cryptosystem using Elliptic Curve

I am trying to build an algorithm to encrypt and decrypt text using ElGamal Cryptosystem using Elliptic Curve. My algorithm generation is done. But at simulation part I stuck. My algorithm steps are ...
2
votes
1answer
138 views

Questions about a SHA3 cipher stream encryption scheme

I have written an encryption implementation using a hash as a cipherstream for demonstration purposes. I know it is slower than more sensible options such as AES but I am interested in several things, ...
3
votes
2answers
277 views

How to calculate key size of a security algorithm?

There are lots of security algorithms. One of the way to measure security of a cryptography algorithm is to find out its key size. There are many key size of a single algorithm. ECC (Elliptic ...
0
votes
1answer
27 views

Vulnerabilities in specifying the hash algorithm used for signature verification on a per-message basis

Let's say that I have a 4096-bit RSA key and when I sign data, I typically use SHA-512. As far as I understand it, the hash algorithm used to sign/verify a message is specified in the message. If a ...
-1
votes
1answer
104 views

How to find roots of equation $f(x)=0 \pmod p $, where $p$ is prime number?

$f(x)$is any nth degree equation $n>0$, how to find roots of $f(x)$ over prime modulo.
0
votes
0answers
55 views

How do substution-permutation networks work? [duplicate]

I understand what is going on in higher level. But I don't understand what's really going on in page 3 and 4 of this slide. Specifically, How $S_0$ and $S_1$ is used? What goes in what goes out? ...
3
votes
1answer
98 views

How does RIPEMD160 pad the message?

For RIPEMD hashing algorithm on hardware I am not exactly getting how padding works So as per my understanding padding will work like explained below: For ripemd 160 message should be multiple of ...
6
votes
2answers
170 views

Advantages of making streamcipher stream depend on plaintext?

Most descriptions that explain how streamciphers work (like the one on Wikipedia), tend to describe a model that boils down to a simple “$ciphertext = plaintext \oplus stream$”, where the stream is ...
4
votes
2answers
122 views

Is there such a thing as a hash function with a fixed size input?

That seems like it would be a useful primitive. Using it in place of a block cipher in the Merkle–Damgård construction would give a variable-length hash, maybe without the tricky business with related ...
0
votes
3answers
150 views

How to convert RSA public keys to one key to use for text hashing?

I've recently asked a question about RSA encryption. One of the things that I don't understand is the usage of two public keys. In the example on Wikipedia, a message is encrypted like: ...
5
votes
0answers
119 views

Homogenous and heterogeneous Unbalanced Feistel Networks

Unbalanced Feistel networks can be homogenous (F-function identical in each round), or they can be heterogeneous (F-function not always identical in each round). The advantage of heterogeneous UFNs ...
8
votes
4answers
673 views

Hashing a password before using for online accounts

I don't actually know what I'm talking about, so apologies if I get anything wrong. At the moment I have a password naming system for most of my online accounts that looks something like this: ...
1
vote
2answers
211 views

Is there an algorithm to hide text in another text, while preserving the meaning of the latter?

Is there a way to hide a text message $A$ inside another text $B$ using a cryptographic cipher/algorithm, while preserving the sense/meaning of $B$ and without anybody being able to notice there is a ...
1
vote
0answers
69 views

What can I do to improve my encyption method [closed]

I'm new to cryptography and I want to learn more. For me, the best way to learn about something that I have no experience with is to experiment and I've coded a very basic approach to a simple ...
0
votes
1answer
209 views

Self-Convergent Hashing

What is the name of an algorithm that hashes its result as an embed of larger set of data that results back to the hash? For instance where $f(x)$ is the hashed result and $x$ is the dataset, and $f(...
4
votes
0answers
84 views

Adding parameters to sponge's capacity

Is it safe to XOR parameters like domain, length of the message or block counter into sponge's capacity or that gives attacker control over capacity? For example NORX XORs domain into capacity. Does ...
3
votes
1answer
566 views

How to prove that a function is not pseudorandom?

I am currently enrolled in a cryptography course, which uses the book by Katz and Lindell. I'm struggling with the exercies which ask for proofs, like the following one: Let G(k) be a PRG with |k|...
-1
votes
1answer
183 views

What is the difference between key size and block size (for AES)

We are working on AES and want to develop a website which should provide an encryption facility but we are not understanding the difference between key and the block size. More appropriately what does ...
3
votes
1answer
142 views

Theoretical decryption of RSA

I am currently looking into RSA and have some questions. I am interested in theoretical answers, assuming there is infinite time for decryption. Is it necessary to work out the private-key exponent ...
3
votes
1answer
930 views

Feistel cipher vs Substitution-permutation network - number of rounds

So I have been doing for the last couple of days comparison between Feistel cipher and Substitution-permutation network. Now I can say I know a lot about them and their similarities and differences ...
6
votes
3answers
118 views

Homomorphic OR operations

Is there an encryption scheme that provides efficient homomorphic OR operations at the ciphertext space? Of course any fully homomorphic encryption can be used but I do not require or want additional ...
2
votes
1answer
155 views

Do any (non-hardware) RNGs exist which could be used to create an OTP for crypto purposes?

I've stumbled (jobwise) over a system where small messages (512 Bytes or less) are encrypted and decrypted using a simple XOR using a OTP. That OTP is created using a seed based on the individual user ...
4
votes
2answers
124 views

Is it okay to use an HMAC of the plaintext and a (possibly distinct) key as the IV for symmetric cryptography?

I was thinking of how to create an IV for a block cipher that doesn't require stored state, and I came up with the idea of using an HMAC of the (padded) plaintext and a (possibly distinct) key as the ...
0
votes
1answer
130 views

Combining a block cipher with a (pseudo) OTP

One of the drawbacks of OTP is that it can require an inconveniently long key. Besides that, it doesn’t provide data authentication. Therefore, I have been working on an algorithm idea, which I hope ...
8
votes
0answers
990 views

Elliptic curve cryptography related key attacks

This question is an extension of Families of public/private keys in elliptic curve cryptography As described above, bitcoin "type 2" deterministic wallets use a root private/public key pair, where ...
5
votes
2answers
547 views

Is Chaocipher a secure cipher under ciphertext-only attack?

Chaocipher was invented by John F. Byrne in 1919. The algorithm was recently revealed – see Moshe Rubin's Chaocipher Revealed, the Algorithm (PDF). While a known plaintext attack successfully finds ...
4
votes
3answers
892 views

Is there any area where AES-CBC cannot be used ? If so, why?

I would like to know the domains or specific applications where using AES-CBC is not advised due to any drawbacks like sequential encryption of AES-CBC ?
4
votes
1answer
84 views

Is my pin algorithm secure?

I'm a hobby programmer and very new to this field. I opened a bank account recently and got two pins. One for the girocard and the other for a creditcard. And I needed two more pins for the online ...
21
votes
5answers
13k views

What is the lowest level of mathematics required in order to understand how encryption algorithms work?

What mathematical fields of knowledge would be required in order to get a good understanding of encryption algorithms? Is it basic algebra, or is there a "higher education" mathematical field ...
4
votes
1answer
93 views

Usefulness of Damgård–Jurik

I am trying to understand what are the benefits of using Damgård–Jurik over Paillier. I understand that expansion factor decreases as s increases. But isn't it the ...
3
votes
1answer
68 views

What is the difference between LCG and Affine cipher?

What is the difference between LCG and Affine cipher? More specific: What are they used for, and what are the structural differences between them?
2
votes
1answer
123 views

Key Derivation Function (KDF): Can a key derived from KDF be considered as a secure key?

Consider a case where we have a master key MS that is used in pseudo-random function to generate a set of pseudo-random values. Then we use key derivation function to derive a key from each of pseudo-...