Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [algorithm-design]

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 name.

Filter by
Sorted by
Tagged with
1
vote
0answers
65 views

Generating a MAC on a Polynomial

In the following, all the operations and polynomials are defined over a finite field of prime order, $\mathbb{F}_p$, where $p$ is a sufficiently large prime number. All polynomials and values below ...
18
votes
4answers
3k views

Are encryption algorithms with fixed-point free permutations inherently flawed?

Flaw in Enigma One of the Enigma machine's flaw was the derangement (fixed-point free permutation) of the produced ciphertext, or simply put: No plaintext-letter can be enciphered to itself. See this ...
8
votes
3answers
594 views

Where can I find a description of the SHA-0 hash algorithm?

Where can I find the description and or pseudocode for the SHA-0 hash algorithm? I am looking for something on these lines: HMAC RIPEMD. I have been implementing a few of those (HMAC, HOTP, TOTP and ...
1
vote
1answer
49 views

Algorithm/encryption technique which outputs a set number of numerical digits e.g. 20 digits from a given input

What the name of the algorithm/encryption technique which outputs a set number of numerical digits e.g. 20 digits based on some input. You can input some data e.g. text or numbers but the output is ...
1
vote
1answer
62 views

What is the most secure encryption algorithm that keeps the entropy the same or even lowers it? [on hold]

On top of my mind comes caesar cipher, but that is not really secure so what is the most secure encryption algorithm that doesn't affect entropy or even lowers it? I know this might not be as ...
1
vote
1answer
47 views

Is there an algorithm that allows to distribute elements securely between parties?

Let's say we have a set of numbers $n = \{ 1, 2, 3, 4, 5, \ldots \}$ and $m$ players ($m < \operatorname{sizeof}(n)$, of course). I want to know if there's a way for all $m$'s to pick different ...
1
vote
2answers
80 views

Is obfuscation considered a cryptographic primitive?

The general definition of obfuscation is the process of obscuring a message (not necessarily source code). There is a "rigorous" method for obfuscation (indistinguishability obfuscation, ...
7
votes
7answers
391 views

In search of a pedagogically simple example of asymmetric encryption routine?

(I am not a cryptography expert; I do write software) I am working with some youth (ages 11-13) and wanted to explore for an hour or so some basic cryptography. Doing symmetric ciphers is pretty ...
0
votes
2answers
165 views

What is the strength and attack vectors of this simple scheme?

Let's say that Alice wants to communicate some secret value $S$ to Bob through a public channel in a way that other people don't know what the value was. To do this, Alice publishes that secret value ...
0
votes
0answers
34 views

Is there a name for encryption which relies on repetitive calculation (=time) instead of a key-value? (e.g. block chain, hash value, block cipher)

Many encryption problems are fast to solve if a key, factor, exponent or something similar is known. Other encryption methods don't have such keys. E.g. a hash value of another value. It's used ...
2
votes
1answer
75 views

Are there any LFSR-based ciphers with variable feedback polynomials?

All LFSR-based stream ciphers that I know of use a fixed feedback polynomial (i.e. the taps are always in the same position). I know that, at least for non-trivial output lengths, it is necessary to ...
0
votes
0answers
30 views

GCD in Montgomery arithmetic

Wikipedia article on Montgomery modular multiplication contains the following statement: Many operations of interest modulo $N$ can be expressed equally well in Montgomery form. Addition, ...
7
votes
3answers
1k views

Why is ECB+CTR not a thing?

AES-CTR is nice for its parallelizability and simplicity but if you duplicate an IV you reveal plaintext. Chaining modes like CFB and CBC don't have that problem per se but they are not ...
0
votes
0answers
23 views

Is there a 'chain-function' which allows computing the value for the index which is next, previous, +/- some constants but has no shortcut for other?

Looking for an algorithm which has a cyclic 'chain'-function which only allows the computation of next, previous element and in addition to that also a shift by a small amount of constants. Example 1 ...
5
votes
1answer
1k views

How to generate unique (random) numbers that can be traced back to a unique source number?

I need to generate unique (random) numbers that I can trace back to a unique source number. For example: source number A can generate numbers A1, A1, A3 .... Am source number B can generate numbers ...
25
votes
4answers
5k views

How do we know a cryptographic primitive won't suddenly fail?

It took more than a decade from when MD5 looked like it was going to break to the point when it was actually broken. That's more than a decade of warning. One might suspect that we were fortunate that ...
0
votes
2answers
51 views

Is there a way to easily encode a message without a computer on either end?

I enjoy making notes and passing them to my friends, and I also like making them encrypted for no reason. My friends enjoy it too, but it's a bit annoying to use the Caesar cipher for everything ...
1
vote
0answers
23 views

Does a digital signature algorithm exist which has a normal, a blind, an elliptic curve and an elliptic curve blind version?

Q: Does a digital signature algorithm exist which has a normal, a blind, an elliptic curve and an elliptic curve blind version? I am searching for an algorithm where you can see what happens if you ...
0
votes
0answers
37 views

Do any block cipher encryption functions (or similar functions) exist which are associative to each other and cyclic?

Most block ciphers encrypt a plaintext deterministically into a ciphertext which allows decryption in the opposite direction. Now, instead of encrypting just one plaintext, I'm looking for a cyclic '...
2
votes
4answers
3k views

What is k in RSA?

I am currently learning about RSA since I didn't understand the public-key-system but now I am… kind of. So I am writing the numbers as follows: $p = prime\ number\\ q = prime\ number\\ N = Public\...
2
votes
2answers
759 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 ...
0
votes
0answers
57 views

Do there exist cryptographic algorithms where the “core” function is 96-to-32-bit?

There exists a FOX family of block ciphers (Wikipedia article: IDEA NXT). This cipher uses a function called "f32" which operates on three 32-bit words and outputs one 32-bit word. This function ...
4
votes
3answers
340 views

Nonce-misuse-resistance scheme applied after the fact to AES-GCM for defense in depth?

This is a follow-up to a previous question about encrypting IV/MAC results from AEAD ciphers. I have a system I'm working on that needs to use standard (NIST/FIPS) cryptography, at least for its ...
3
votes
1answer
155 views

Why doesn't GMAC/GCM encrypt its authentication tag?

As most know, a duplicate nonce with GMAC/GCM allows key recovery attacks against GMAC itself and thus the ability to forge messages. This is because GMAC computes GHASH and then just XORs this with ...
7
votes
1answer
1k views

Elliptic curve cryptography related key attacks [closed]

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 ...
3
votes
1answer
163 views

How can I verifiably announce a choice without revealing its content?

Here is the simplified problem: Alice chooses from a small set of possible values. Bob guesses which value Alice picked. Alice reveals what value she picked. Alice's choice must stay secret ...
3
votes
0answers
94 views

How good is the middle cube method with jumbled digits? [closed]

I had to make my own PRNG for a stream cipher for an inter-school science project. So I thought of cubing the seed instead of squaring it (like in the middle square method). And to prevent prediction ...
1
vote
1answer
83 views

Reversible Decryption in Symmetric Key Algorithms

I am currently learning the Internal Working of Symmetric Key Algorithms, like DES, AES, BlowFish, IDEA just to name a few. These are all quite complex Encryption alogrithms, which requires a lot of ...
3
votes
0answers
69 views

Can zero-knowledge proof be used to determine if another person knows a certain movie with a twist ending?

Suppose I want to talk with a co-worker about a movie called "The Twist Movie". I know the movie contains an interesting twist, and bringing up the movie in a discussion about twists in movies might ...
2
votes
2answers
134 views

Efficient way of generating a random number of N (less than 64) bits with exactly M bits equal to one [closed]

Would there be an efficient way to implement a function with the following signature: unsigned long long int random_word(size_t n, size_t m) that would generate ...
4
votes
1answer
66 views

Optimized Garbled Circuit Algorithmic Description

The Garbled Circuit (GC) is now over thirty years old, and many optimization methodologies have been proposed, including point-and-permute, row-reduction, free-XOR, fixed-key blockcipher, half-and. ...
3
votes
0answers
114 views

Are there any cryptographic methods which use multiple cyclic groups?

For some cryptographic methods you can construct them. e.g. elliptic curves (product of two cyclic groups) or Diffie–Hellman (can be product of n-cyclic groups). But they have no usage because at a ...
7
votes
1answer
19k 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 ...
1
vote
1answer
76 views

Risks of publishing multiple signatures

Is there a risk when publishing multiple signatures for the same message? For instance, an ECDSA key (using an EC key) and a RSA-PSS signature (using a RSA key). The context of my question is the use ...
8
votes
1answer
164 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 ...
0
votes
1answer
109 views

Is Permutation conjugate problem hard?

Let $x$,$y$,$z$ be permutations. Then public key is $z=xyx^{−1}$ and $y$. Is permutation conjugate search problem easy? if yes, how to find $x$ from $z$ and $y$? Let be a is Alice's secret key as ...
3
votes
1answer
129 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?
8
votes
1answer
1k views

Pollard's kangaroo attack on Elliptic Curve Groups

Let's say I've intercepted some bits of a Diffie-Hellman private key: $x = n \mod r$. I can get the remaining bits by doing a kangaroo search. This algorithm works over $\mathbb{F}_p$. Can it be ...
3
votes
1answer
213 views

Are “non-mathematical” encryption algorithms comparably secure against brute force key recovery?

I recently learned about a desktop encryption application called ALKEMI, which does not use mathematical encryption according to the website, which I understand to be a misnomer, at best: The ...
0
votes
0answers
35 views

How to encrypt a small number of identities (which are related to each other)? / Which algorithm has the smallest bit-length?

I'm looking for an encryption with as small numbers as possible. Given a small group of identities ($G$) (e.g. numbers from $1$ to $N$). Given one entry (or a small number) $e_i$ allows to compute ...
8
votes
0answers
374 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 Feistel ...
0
votes
1answer
306 views

Choosing encryption algorithms and encryption protocols in military systems

Militaries use their own cryptographic algorithms, those of a private third party, or ones that are openly available. But fear of a backdoor having been planted in publicly-available encryption ...
4
votes
1answer
140 views

How to construct a “toy” version of Gimli permutation for three (instead of twelve) 32-bit words?

I am interested to see a "toy" version of the Gimli permutation for three (instead of twelve) 32-bit words. I see that the "core" sub-permutation of Gimli operates on three 32-bit words, but I don't ...
1
vote
0answers
45 views

Constructing Low-Density Parity-Check Codes of length $n$ and minimum distance = $\delta n$ over $GF(q)$? [closed]

I am looking for a way to construct an LDPC (Low-Density Parity-Check) Code $C$ of length $n$ and minimum distance $d_C$ that scales linearly to $n$, meaning $d_C = \delta n$ for $\delta \in (0,1)$. ...
0
votes
0answers
18 views

Off-Chain Channel With Multi Participants That Have Different View/Write Access

I'm looking to expand my blockchain ability to have off-chain channels between different participants (let's say more than 2 participants). The requirements: Only the participants of the channel ...
9
votes
1answer
502 views

Understanding the wide trail design strategy

I am trying to understand the wide trail design strategy. I have read the paper which describes it from the point of view of AES. From what I understand, it is a technique to increase diffusion in a ...
2
votes
0answers
72 views

Determining which encryption algorithm to use [closed]

I'm a traditional software engineer. Recently, due to the nature of a current project, I have been exposed to many cryptographic libraries--there are so many encryption algorithms! How do you choose ...
1
vote
1answer
40 views

Does any problem arise when the order of an elliptic curve is equal to its prime field modulus? [duplicate]

Regarding cryptographic schemes in elliptic curve cryptography, is there a problem with having the order of an elliptic curve being equal to its prime field modulus? That is, an elliptic curve where $...
0
votes
0answers
52 views

Modifying Elliptic Curve Parameters

For context, I was watching this bit of the video: which goes over this source code. The piece is about elliptic curve cryptography and how it works. I want to use some of this knowledge to make my ...
1
vote
1answer
118 views

Why does a padding block exist for ECB and CBC modes?

In ECB and CBC mode, the size of cipher text is more than the plain-text size by one padding block. From what I read, ECB does a simple encryption to each 64 bit block of a Plain text, and produces ...