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)

2
votes
2answers
85 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 ...
2
votes
1answer
84 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, ...
0
votes
1answer
18 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
vote
1answer
85 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.
2
votes
0answers
53 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? ...
1
vote
1answer
44 views

construction of division polynomials

I'm not sure if this is the right place for my question.... I'm trying to understand the construction of the division polynomials used in the schoof algorithm. I firstly followed the report of ...
3
votes
2answers
141 views

What is the difference between SHA-3(Keccak) and previous generation SHA algorithms?

SHA-1 and SHA-2 share the same structure and mathematical operation as their predecessors - SHA-0 and MD5. Both SHA-0 and MD5 have been broken. This is one of the main reasons why SHA-1 is considered ...
3
votes
1answer
70 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 ...
-1
votes
1answer
52 views

How much information is revealed?

Let Alice pick $v_{1}$,$m_{1}$$\in \mathbb{P}$ and Bob $v_{2}$,$m_{2}$$\in \mathbb{P}$. Now Alice computes $v_{1}$$^{m_{1}}$ and so Bob does $v_{2}$$^{m_{2}}$ Then Alice exchanges $v_{1}$$^{m_{1}}$ ...
2
votes
0answers
101 views

help with cryptanalysis of a sponge permutation

I have been studying and researching hash functions. So far my research has led me to the sponge construction. It appears that the permutation used in the sponge to stir the state is more or less ...
8
votes
4answers
538 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: ...
4
votes
0answers
23 views

Understanding the definition of HGD

On the section 4.2, page 10, of the paper Order-Preserving Symmetric Encryption, the authors define two subroutines: the first one is called $HGD$ and the second one is $GetCoins$. I have doubts ...
10
votes
8answers
2k views

Are there any advantages in using proprietary encryption?

Proprietary software generally relies on the fact that in keeping the encryption algorithm private, it gets an extra layer of security implying "Security through Obscurity." Obviously this phrase has ...
1
vote
0answers
58 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 ...
7
votes
0answers
67 views

Default algorithm for scalar multiplication of elliptic curve points by the MIRACL Library

What is the default algorithm used by the MIRACL-Library [1] for elliptic curve cryptography systems to perform scalar-point multiplication with curves of Weierstrass form satisfying the equation : ...
6
votes
3answers
161 views

Why does DES implement so much Cross Wiring?

I've been going through DES, and I find that most of the blocks simply Reshuffle the input, which may be termed as "Cross Wiring". This include IP, IP-1, PC-1, PC-2 and even Expansion (although this ...
-1
votes
1answer
64 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 ...
4
votes
2answers
100 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 ...
2
votes
1answer
117 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 ...
6
votes
3answers
116 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 ...
4
votes
2answers
77 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
111 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 ...
4
votes
0answers
81 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 ...
4
votes
1answer
64 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 ...
4
votes
1answer
69 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 ...
2
votes
1answer
52 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?
5
votes
0answers
90 views

Big block cipher as memory-hard function

I'm wondering, if something like block cipher with big block size is a good memory-hard function? All memory-hard key derivation functions I've seen look more complex than that, which made me ...
2
votes
1answer
74 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 ...
6
votes
2answers
247 views

HMAC vs ECDSA for JWT

I will be implementing JSON web tokens into my website and have a question about implementing them. I have a choice of using two algorithms, HMAC-SHA256 and ECDSA-SHA256. I have used HMAC-SHA256 in ...
3
votes
0answers
57 views

Which precautions to protect against side-channel attacks on ARX ciphers?

In recent crypto there has been a trend to design ciphers using only the ARX set of instructions - i.e. additions (modulo $2^{32}$ or $2^{64}$), rotations (by a fixed constant) and XORs, examples ...
1
vote
0answers
27 views

References for combining LFSRs with different lengths and taps?

I started learning streams ciphers with the use of LFSRs. Therefore, I tried to simulate what I am learning in a C sourcecode, which combines three registers and ...
2
votes
1answer
76 views

Diffie-Hellman using a different modulus on both sides

For Diffie-Hellman Key Exchange, the used modulus is the same throughout the process. Is it possible to use 2 different for both sides? For example, $A \gets M^{d_1} \pmod{n_1} $ $B\gets M^{d_2} ...
2
votes
1answer
96 views

Cracking a hash which descends to a single value after repeated hashes

Assume I have a hash function (such as the one below) and a cipher, and I know that if I repeatedly hash any string over and over again, it will eventually descend to one unique value. Is there any ...
-3
votes
1answer
87 views

Is it interesting to design stream ciphers parametrized by a CSPRNG?

Would it be interesting to have new stream ciphers whose design is parametrized by a CSPRNG? I.e. to instantiate the stream cipher, you just have to select and plug in any CSPRNG of your choice.
0
votes
1answer
63 views

Homomorphic Encryption with Addition and Exponentiation

Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant. I am getting an output ...
4
votes
0answers
57 views

Salary Negotiation Problem

Imagine Alice is applying for a new job. Alice has an idea of the minimum salary that she is willing to accept—let's call this value A. Bob, the hiring manager for ...
1
vote
2answers
166 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 ...
3
votes
1answer
47 views

Making Pascal Paillier' output absolute

Can we make subtraction result of cipher texts encrypted by Pascal Paillier absolute. Just like we use method Math.abs() in Java ? For example, if we subtract 0 from 1: 1-0 = 1, it is positive but 0-1 ...
0
votes
3answers
84 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: ...
2
votes
3answers
171 views

One Time Pads and reuse of the decrypted message?

How is it insecure when Alice encrypts a message with a One-Time-Pad to Bob, and Bob then uses the decrypted message from Alice as the next One-Time-Pad? For example: Alice sends Bob a message ...
2
votes
1answer
47 views

Symmetric-like cyphers with several steps

Are there any good symmetric-ish cyphers that involve three or more steps with independent key material for each step? Formally, there should be a function $K(s)$ that returns a tuple $(k_1,..,k_n)$ ...
0
votes
1answer
79 views

Galois Field ($2^{16}$) for encryption in place of $GF(2^8)$ in AES

AES algorithm is using $GF(2^8)$ Galois Field. What if we use $GF(2^{16})$ in place of $GF(2^8)$? Will this improve the algorithm or not?
3
votes
1answer
108 views

Can the round function $F$ in a Feistel Network be practically any non-invertible function?

This question might seem silly, but how true is the fact that the round function $F$ does not have to be invertible? I am curious to know this, because non-invertible functions can be very lossy, ...
4
votes
0answers
59 views

What level of security is provided when a Feistel Cipher is used as a round function of another Feistel Cipher?

Recently, I was reading: Are there any specific requirements for the function F in a Feistel cipher?, and the answer posted mentions a Feistel Cipher named Turtle, which uses a four-round Feistal ...
1
vote
1answer
103 views

AES-256 mode with per-block-key being a SHA-256 of SHA-256 of secret key, random public salt and block number. What's amiss?

Please criticize the (homebrew?) mode described below; to point out a single major defect/uncertainty or the link to (the analysis of) an equivalent construction is quite enough. Assume the ...
2
votes
1answer
49 views

How to detect changes in data while preserving confidentiality (under constraints)?

Suppose party $A$ has two pieces of data, $X$ and $Y$, either of which may change separately, or they may change together. Given the following constraints: $A$ knows its current $X$ and $Y$ but has ...
2
votes
1answer
40 views

Data Switching and Information Leakage

Hypothesis: Let $z,a$ be uniformly random elements of a field $\mathbb{F}_p$ where $p$ is a large prime number. Also, let $(-z)$ be additive inverse of $z$. I have a fixed secret value $x$. I mask ...
0
votes
0answers
98 views

Values of p and q when e = 3 (RSA)?

I am doing a paper on textbook RSA (this is for high school btw) and in my example I need two very large primes, but I want my $e = 3$. Is there a short way to calculate the values of $p$ and $q$ ...
2
votes
1answer
83 views

Are there full cycle cryptographic/one-way hash primitives?

I'm looking for behavior similiar to that of LCGs, (i.e. input and output sizes are same). Full cycle of $2^{32}$ different inputs generates full cycle of $2^{32}$ different outputs, distribution of ...
1
vote
1answer
86 views

Hypothetical encryption technique, is it secure?

This to me, sounds like a great idea, but with all rosy-tinted ideas it needs some grounding in reality. Here are the steps of the hypothetical system (with the hypothetical part highlighted): User ...