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
1answer
7 views

Using $key^{th}$ multiple of $\pi$ as a one-time pad

With a key $k$ of sufficient length, say 128 bits, is it possible to use $k^{th}$ multiple of $\pi$ as a one-time pad? Please enlighten on the security as well as ...
0
votes
1answer
45 views

Why computation of u*v^3*(u*v^7)^(p-5)/8 is suggested instead of (u/v)^(p+3)/8

Working with Curve25519 I've faced with suggested form of computation square root candidate as: $uv^3(uv^7)^{\frac{p-5}{8}}$ instead of $\left(\frac{u}{v}\right)^{\frac{p+3}{8}}$. Why it is so? Or why ...
2
votes
0answers
55 views

Is there any way to encrypt the path in between a small number of 3D positions?

Or more general: given two valid random cipher $c_0, c_1$ a function $D$ with $$D(c_0,c_1) = (a,b,c)$$ should exist but hard to compute (for most cases). The result $(a,b,c)$ represents the path from $...
2
votes
1answer
61 views

Is there any block-cipher, format-preserving or similar encryption method with known cycle size? (without short-cut, with known source/runtime vars)

E.g. given a $n$-bit message $m_0$ and an encryption function $f$ After applying the function $c$ times it will result in $m_0$ again. $f^1(m_0) = f(m_0) = m_1$ $f^2(m_0) = f(f(m_0)) = f(m_1) = m_2$ .....
2
votes
0answers
64 views

Is this “AND” implementation safe against side channel attacks?

I found out that the following is a working implementation of calculating an AND function between XOR masked shares, implementation at Github. It works by calculating parities, whose terms cancel each ...
0
votes
1answer
45 views

Can Hash Functions take fixed-size input?

Iโ€˜ve argued for quite some time with a friend about wether or not this C# method can be qualified as a Hash Function. ...
5
votes
2answers
296 views

Recommendation of lightweight RNG for Miller-Rabin primality test

Miller-Rabin tests the compositeness of candidate numbers (hence, input $x$) that's often used as a primality test. The M-R test requires different random numbers for accuracy and confidence in the ...
2
votes
1answer
51 views

Building a 4-bit S-box with a 4-uniform DDT

I am looking for a 4-bit S-box which has only 4s in its difference distribution table (except the top left corner) but I was not able to find one in the literature. Has such an S-box been already ...
0
votes
2answers
60 views

Question about SSH host key algorithms

I'm currently writing a report for my Master's degree on the SSH protocol. Quite interesting! However I'm having trouble getting into the inner workings of the host key algorithms. For example, ...
6
votes
3answers
254 views

Nothing-up-my-sleeve numbers standard

Premise Several cryptographic primitives employ randomized numerical constants. To avoid suspicious that the designer selected such constants in order to plant a backdoor, "nothing-up-my-sleeve ...
1
vote
3answers
98 views

Does this algorithm have a name? (Distance between letters)

This came to mind the other day and I'm wanting to know if there is a name for the following algorithm (I'm not sure if "cipher" is the right word for it): Take two consecutive letters at a ...
6
votes
1answer
218 views

Fast irreversible transformation/compression of short messages using a secret

I'm looking for a very fast function $f(m, k) $ that takes a 64-bit integer $m$ and a fixed secret key $k$ of virtually any size (generated by a CSPRNG) and turns them into a 64- or 32-bit integer $ r ...
1
vote
1answer
74 views

Long or short encryptions?

Is it generally considered desirable - or not? - to use an algorithm which encrypts a single byte into a byte array of length around 5 or 10? Greater length allows me to add additional layers of ...
0
votes
1answer
47 views

Name for crypto algorithm that preserves visual pattern

Given some input plaintext and output ciphertext, is there a group of crypto algorithms that mean that a change in the ending x bytes of the input plaintext makes some y change at the end of the ...
2
votes
3answers
94 views

Reason for squaring and not arbitrary exponentiation in Wesolowski and Pietrzak verifiable delay functions (VDFs)

I'm working at understanding the Wesolowski and Pietrzak RSA group based VDFs (verifiable delay functions). These basically work by requiring the prover to do a bunch of repeated squaring within a ...
1
vote
1answer
81 views

Hashes or ciphers with all rounds executed in parallel?

Pretty much every cipher or hash I've seen has multiple rounds the are designed to be run serially one after the other. Has anyone ever designed a fully parallel cipher or hash? This would be one ...
0
votes
0answers
36 views

Brute force attack on a block cipher with length n [duplicate]

Consider a block cipher whose block length is ๐‘›. ๐‘ = 2๐‘› is number of possibilities. Imagine we have ๐‘ก plain text-cipher text pairs { ๐‘ƒ๐‘–, ๐ถ๐‘– = ๐ธ๐พ(๐‘ƒ๐‘–) } , where the key ๐พ selects one of ...
2
votes
1answer
90 views

Unbalanced numeric Feistel network implementation

After reading a comprehensive paper [1] covering various kinds of generalized Feistel networks, I've tried to implement the Unbalanced Numeric Feistel variant, which relies on modular arithmetic for ...
-1
votes
1answer
59 views

Alternatives to XTEA as encryption algorithms for stenography

I recently implemented an algorithm written in Python that was using the XTEA encryption method. Are there any more reliable algorithms than the XTEA , regarding to memory usage and PSNR ratio ,other ...
10
votes
2answers
2k views

Why is this not a viable key exchange algorithm? [duplicate]

I was just wondering why this kind of algorithm can't be used instead of, say, Diffie-Hellman to exchange keys: Alice decides on a key she wishes to share with Bob. Alice generates a stream of bytes ...
0
votes
0answers
78 views

Most popular block ciphers

Which block (cipher) algorithms are the most popular and most used today? What parameter values (block length, key length) are now considered standard (safe).
0
votes
0answers
46 views

Is this really a universal one-way function?

This PDF supposedly gives a construction of a universal one-way function, i.e. a function which is one-way as long as there exists a one-way function: Recall that there are only countably many Turing ...
1
vote
0answers
48 views

Hashing of variable-length chunked data leading to leakage of secret key from side channel?

Hypothetically, secret data could be hashed in some schemes in one way or another. Could chunking of the data lead to exposure of secret component through side channel? Say converting a randomized ...
0
votes
0answers
34 views

Generating traceable passwords

I'm new to cryptography, so please bear with me as I try to explain what's going in my head. I have an idea to write a program to generate one-time passwords for online conferences that are although ...
3
votes
1answer
61 views

Multilinear Extension Polynomial: Compute the coefficients of the expanded polynomial

Let $\textbf{a}=\left[10, 32, 57, 81\right]$ and $x=\{0, 1, 2, 3\}$. Then multilinear extension of vector $\textbf{a}$ is the polynomial, $f_\textbf{a}(x_2, x_1) = 10(1-x_2)(1-x_1) + 32(1-x_2)x_1 + ...
0
votes
0answers
17 views

Given the anonymity in the blockchain under Mimblewimble - how would you identify whether a transaction had already been spent?

I have searched high and low, but can't see any explanation of an algorithm that could take a Mimblewimble based blockchain and identify the unspent transactions (so if someone tried to spend a ...
0
votes
0answers
25 views

How does APE: Authenticated Permutation-Based Encryption work?

I am trying to understand the encryption and decryption process of the APE: APE: Authenticated Permutation-Based Encryption for Lightweight Cryptography Full paper The Encryption what is exactly the <...
0
votes
1answer
47 views

Given a set of numbers which return a response code, how can I find the algorithm used to produce the response?

I'm working on a problem where I provide an 8 digit integer and a 16 digit integer, then a 10 digit integer response is produced. For example 12345678 and ...
0
votes
1answer
46 views

Security of a cipher with some imperfection in round function

I got specific problem with round function in my symmetric cipher. It works on $128$-bit blocks. Every round got two $128$-bit keys. Block is xored with $k_{1}$ on the beggining of the round. Then it ...
1
vote
1answer
64 views

When attacking keyed algorithms, how is it known when the output is correct?

I've been reading a little bit about cryptanalysis, and I'm wondering how attacking algorithms that work on keys is performed. It's obvious how algorithms like MD5 are attacked, in pseudocode: ...
2
votes
1answer
216 views

Complexity of Gaussian Elimination over a Finite Field

I read somewhere that the complexity of solving a Linear $n\times n$ system over a Finite Field $\Bbb F_q$ using Gaussian Elimination is $\mathcal{O}(n^3)$ operations in $\Bbb F_q$. What's the role of ...
1
vote
0answers
39 views

Looking for an algorithm to encrypt with a single key and decrypt with a lot of keys without consuming too much space

Is it possible to have an encryption scheme that could be encrypted with a particular key, then decrypted with a large amount of keys without massively inflating the size of the final result? I am ...
0
votes
1answer
173 views

Can the EdDSA signature scheme be customized with OpenSSL?

EdDSA has currently two signature schemes: Ed25519 and Ed448. Ed25519 is the EdDSA signature scheme using SHA-512 (SHA-2) and Curve25519 Ed448 is the EdDSA signature scheme using SHAKE256 (SHA-3) ...
1
vote
0answers
103 views

Anamorphic Cryptography, what do you think about it? [closed]

I'm currently working on a personal project using a special kind of crypto I've imagined (noooo please don't !!!), called the Anamorphic Cryptography. The project: create a complete keyless ...
1
vote
1answer
67 views

What papers describe the rationale behind cryptography algorithms

I am trying to introduce myself to cryptographic hashing and encryption. I am looking for original papers of sorts, to describe the inspiration behind why they choose certain numbers, if they are ...
2
votes
1answer
169 views

Montgomery Multiplication with CRT

I am attempting to understand how to use Montgomery multiplication in an RSA private key operation: $X \equiv a^{e} \pmod{n}$ where $a$ is the message, $e$ is the exponent, $n$ is the modulus. Using ...
4
votes
2answers
140 views

What's the name of this random number generation algorithm?

I'm looking for the name of an RNG method or algorithm, described below. Combining multiple results of a non-uniform random number generator can produce a more uniform result. It seems like this would ...
0
votes
0answers
54 views

How to design number of rounds in my cipher?

I have specific cipher which is built from permutations. It has or should has few rounds. If we do 2 rounds it is like 2 permutation composition. 3 rounds are like composition of 3 permutations and so ...
2
votes
1answer
103 views

Cryptographic function that can 'pack' numbers

Is there a cryptographic algorithm that can 'pack' a bunch of strings/numbers and "confirm" if a string/numbers exists (later in the code) while keeping the output hidden? For example, I have ...
2
votes
0answers
79 views

How to construct a โ€œtoyโ€ version of the Ascon permutation?

I want to obtain a โ€œtoyโ€ version of the Ascon permutation defined for five 8-bit words (instead of five 64-bit words.) It seems that it is possible to use the same bit-sliced 5-bit S-Box. But is it ...
0
votes
0answers
32 views

Are there popular and secure Authenticated Encryption schemes with Salsa20/Sosemanuk in CTR-mode with a Carter-Wegman MAC?

I read that AES/GCM is a good choice for authenticated encryption because: AES has very strong heuristic security Encrypt-then-MAC leaks no information about the plaintext The CW-MAC in GCM can be ...
1
vote
0answers
39 views

Help on validation code algorithm [closed]

I wonder if someone can help me find the algorithm used to generate validation codes from a serial number. I already have some working examples of serials->codes pairs: 19003148 -> 523254 19003162 -...
1
vote
1answer
128 views

Error correcting codes that are indistinguishable from random

Suppose you have a public program P(n) which takes message n and generates an encrypted output (utilizing asymmetric cryptography) for some entity which has the private key to decrypt it. Using a ...
0
votes
0answers
37 views

Approach used with XOR cipher in black box scenery

What's the approach used in cryptanalysis to make an decrypter for a simple xor stream cipher in a Black Box scenery with only the output?
0
votes
0answers
38 views

How to determine the maximum number of times the DES algorithm needs to be run?

I am only a beginner in cryptography and I am getting confused by the following: Question Consider a known-plaintext attack performed on a double-DES cryptosystem. (a) Determine the maximum number ...
4
votes
1answer
61 views

Multiparty dataset intersection count

Typically, Private Set Intersection (PSI) protocols let you learn the subset of items on each party's dataset that are in the intersection. The problem in this case is a relaxation of these kind of ...
1
vote
1answer
304 views

How to calculate RSA Key Size correctly starting from 384 bits to 15360 bits or beyond 15360 bits

Hello fellow experts here, I am new to cryptography. Recently I looked into RSA Key Size (Microsoft RSA library), it actually describes that the minimal key length required is 384 bits and maximum ...
0
votes
0answers
44 views

How to calculate degree of confusion of an encryption algorithm?

I am programming an encryption-decryption model in python 3. I want to check its strength. I found 3 methods to check, they are: 1. Degree of diffusion 2. Degree of confusion 3. Integrity check For ...
1
vote
1answer
43 views

Can MFA codes be predicted if you know what their values were at a previous time?

I use an app on my phone that, after scanning a QR code on a website, gives me 6-digit codes which change every 30 seconds. These codes can be used for Multi-Factor Authentication (MFA) on some ...
1
vote
1answer
77 views

easy hash algorithm to use without computer [duplicate]

I am searching for a simple hash algorithm(s) which can be used to calculate relatively secure hash without using of any computer. Some requirements: use only simple arithmetics operations (+ - / *, ...

1
2 3 4 5
โ€ฆ
16