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

crypt algorithm by a vectored key and the error is Proportional to the difference between input key and real key

I want to find an crypt algorithm which provides the functionality described below. Given a key (a vector Vkey) and a data (an image), use this key to encry the image; the encrypted image can not be ...
1
vote
0answers
33 views

Key stream instead of key schedule

Let's consider block cipher in CTR mode. And let's consider keyed PRNG or just good PRNG with seed as a key. PRNG has to be very fast. Is it a good idea to put away key schedule and do "infinite&...
0
votes
0answers
32 views

Test vectors for SIT -encryption algorithm?

Test vectors for SIT -encryption algorithm? I'm looking for Tests Vectors to test my implementation of SIT. Thanks a lot.
0
votes
0answers
28 views

Advantages of round function as a good PRNG

If round function in block cipher is a good PRNG, does it have any advantages? Can we expect better faster diffusion or confusion? Does it make sense to design algorithms in such a way that the round ...
1
vote
4answers
131 views

Are there any cryptographic algorithms, which lets the user apply some modifications on the encoded data, without decoding it?

I would like to encode some data with a key, and send it to a third party. They don't know the key to decode it, but I would like to make it possible for them to apply some modifications on it. Then ...
0
votes
2answers
197 views

What is the name of this public key encryption cryptosystem?

I have been trying to find the name of a public key encryption cryptosystem that I learnt as an introduction to cryptography some years ago but the only scheme I could find was something similar but ...
0
votes
0answers
16 views

Few questions about setting up SuperCop primitives

Have a couple of questions about the supercop library. I've refrained from asking this question for a considerable amount of time because every time I thought about asking it, it sounded stupid in my ...
2
votes
1answer
82 views

How to produce a ternary value (3-face “dice roll”) digest from a message?

Apologies in advance if the terminology I am using in the title of this question, is flawed. I want an algorithm that will produce a ternary value (meaning from a set of three, as opposed to from a ...
-2
votes
1answer
83 views

Writing an original encryption algorithm [closed]

Firstly, I'd just like to clarify, I am less than a beginner when it comes to cryptography. Please bear with me. I'm sure its flawed I just don't know how. I was bored one day, and decided to come up ...
2
votes
1answer
139 views

Does a bigger key mean more security - if we do not change the structure of the algorithm?

Let's say I have 128-bit cipher in which each round needs to get 768 key bits. Let's consider 10 rounds. It can be easily 128-bit key cipher. I can do key schedule and produce 7680 bits of keys (let's ...
0
votes
2answers
111 views

Encrypting cryptocurrency seeds for cold storage

I’d like some feedback on an encrypting algorithm. I’m not rolling my own, but even putting together well-proved pieces may create many pitfalls. (I don’t know if I'm stretching questioning in this ...
0
votes
2answers
98 views

How can a recipient recognize which encrypted messages are intended for them?

Let's say there's a decentralized email service where parties' public keys are known. A sender sends a message to a recipient by encrypting via RSA with the recipient's public key and posting the ...
3
votes
2answers
79 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 practical aspects (only if secure of ...
0
votes
1answer
76 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
57 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
64 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
68 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
52 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
306 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
57 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
84 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
288 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
109 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
230 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
79 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
51 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
107 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
84 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
37 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
102 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
77 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
89 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
52 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
53 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
35 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
69 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
18 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
27 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
48 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
47 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
69 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
276 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
40 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
231 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
114 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
73 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
192 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
145 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
58 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 ...

1
2 3 4 5
16