Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. 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
0
votes
0answers
38 views

Should I proceed with this for my project? Is it correct?

We have: Select five Prime numbers $p$, $q$, $r$, $s$ and $t$ Compute $n=p*q*r*s*t$ Calculate $Φ(n)=(p-1)(q-1)(r-1)(s-1)(t-1)$ Collect $e$ such that $p < e < Φ(n) … Φ(n)$ and $n$ are co-prime ...
1
vote
0answers
41 views

Why does solving the underlying polynomial system “break” the multivariate cryptosystem

I was wondering why exactly does solving a polynomial system (directly or indirectly) "break" a multivariate cryptosystem as a digital signature. I realize that the exact reason differs from system ...
0
votes
2answers
92 views

How does this formula work $(aG + bG) = (a + b) G$ in ECDSA?

Please explain how does this formula $(aG + bG) = (a + b) G$ work in ECDSA? According to the source: $a$ and $b$ are different private keys Suppose $a = 3$ $b = 4$ then the public key is $Q = aG$...
1
vote
0answers
74 views

When Frankensteining ciphers together, why does order matter? [duplicate]

In a comment on this answer, Cort Ammon states I have heard interesting solutions to these issues involving encrypting something with a proper tested algorithm first (not second), and then ...
15
votes
4answers
8k views

Creating cryptographic algorithms at runtime

Would it be possible to create a program with which to create a cryptographic algorithm (i.e. encryption or hash) using well-known elements of other algorithms in the same way that algorithms "reuse" ...
0
votes
0answers
11 views

OpenSSL performance test on a specific file [migrated]

I m new in this world of Cryptography. I`m trying to check the performance of the various algorithms on with OpenSSL. Looking on the internet I find this command : openssl speed aes-128-cbc des ...
0
votes
0answers
34 views

Is it possible to decrypt a message if a hash of the message was used as a key to encryption [duplicate]

I encountered a scheme where a hash of a message was used to encrypt the same message: result = Encrypt(message=m, key=hash(m)) Specifically: ...
1
vote
1answer
60 views

Is there such a thing as shortcutable key stretching?

I'm curious if there's a cryptographic (or mathematical) technique for key stretching that allows someone with a secret to quickly derive the final key, requires a deterministic number of rounds for ...
1
vote
0answers
70 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 ...
1
vote
1answer
51 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
63 views

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

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
83 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, ...
0
votes
0answers
43 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 ...
0
votes
0answers
32 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, ...
8
votes
7answers
415 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 ...
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 ...
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
2answers
58 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 ...
0
votes
0answers
38 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 '...
0
votes
0answers
60 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 ...
3
votes
1answer
166 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 ...
2
votes
1answer
78 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 ...
3
votes
0answers
71 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
137 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
3answers
360 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
0answers
117 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 ...
1
vote
1answer
79 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 ...
0
votes
1answer
114 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 ...
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 ...
3
votes
1answer
222 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 ...
4
votes
1answer
146 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 ...
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 ...
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)$. ...
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
90 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 ...
1
vote
1answer
41 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
53 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
150 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 ...
0
votes
0answers
49 views

Chinese remainder theorem

Z/11Z[X] is the finite field P(2) = 4 P(3) = 3 P(5) = 7 How can I solve my congruence system with polynoms? I made my system of congruence like that : X = 2 [4] X = 3 [3] X = 5 [7] And it gives me ...
3
votes
1answer
81 views

Cryptography on programming

In pursuit of understanding a randomly found topic I was interested in learning the connection between integer programming and cryptography and found Lenstra Jr.'s Integer Programming and Cryptography....
0
votes
2answers
108 views

Why is prime number size important for RSA security?

RSA modulus is $N = pq$ where $p$ and $q$ are prime numbers. I read from somewhere that the time it takes to decrypt the RSA encryption increases exponentially as key length increases, which depends ...
4
votes
0answers
93 views

Aside from Keccak, are there any keyed/unkeyed permutations where the choice of all rotation constants is not based on heuristic methods?

I am interested to see examples of cryptographic algorithms (namely, keyed or unkeyed permutations that transform an $n$-bit input to an $n$-bit output) where the choice of all rotation values is not ...
2
votes
1answer
97 views

Bit-strength of discrete logarithm for a group of integers modulo a safe prime

Preliminaries Let $p$ be a safe prime number. Let $\mathbb{Z}_p^*$ be the multiplicative group of integers modulo $p$. We have $\mathbb{Z}_p = \{\,a \in \mathbb{Z} \mid 1 \le a \lt p\,\}$ . Let $g \...
2
votes
3answers
247 views

How can a hash have a fixed length?

I am very new to cryptography, I apologize if my question is so basic. I do not understand how a hash can have a fixed length, because you can have infinite inputs to a hash function. With a fixed ...
2
votes
1answer
73 views

How to symmetrically encrypt 64bit values?

I'm curious about an algorithm that would be good for the following scenario: 32-bit "plaintext" input, taken from a counter 32 or 64-bit "ciphertext" output It should be possible to decrypt the ...
3
votes
2answers
185 views

Choosing the size of an S-box

The most common S-boxes that I've seen are 4-bit and 8-bit (I've seen a 3-bit S-box in PRINTcipher, but I'm pretty sure they only did so due to significant hardware constraints). I understand that ...
0
votes
1answer
34 views

Which is the fastest way to find a member of a subgroup with known size modulo prime $P$, with know factorization of $P-1$?->$x$ with $x^s \mod P = 1$

Assuming you know the factorization of used prime $P-1$ $P-1 = s \cdot f_2\cdot f_3...f_i$ Now you want to find a member of a subgroup $\mathbb{Z}_s$. This means any $x$ with $x^s \equiv 1 \mod P $ ...
1
vote
1answer
130 views

New Cryptographic Algorithm [closed]

I was wondering about an algorithm that would take a bitstring as an input, shuffle it and output it. You could use a deterministic RNG to select pairs of bits to swap, using the seed as some sort of ...