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
11 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
7 views

How to securely design REST API for Password Manager app? [migrated]

I want to create Password Manager where users can create their accounts and store website passwords. For the frontend, it will be a mobile app, but I need REST API as the backend data where the data ...
6
votes
1answer
2k views

How was the MDS matrix used in AES chosen?

$$\begin{pmatrix}2&3&1&1\\ 1&2&3&1\\ 1&1&2&3\\ 3&1&1&2\end{pmatrix}$$ In the above MDS matrix used in AES encryption, why are the numbers $2$,$3$ and $1$...
0
votes
0answers
19 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 <...
6
votes
2answers
120 views

Does pairings based cryptography inherently require a CRS/trusted setup?

In all algorithms I've seen that rely on pairings-based cryptography (some examples: snarks without PCPs, more snarks, sublinear ring signatures), a common reference string is required. Is this always ...
0
votes
1answer
46 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
43 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 ...
0
votes
0answers
20 views

how to implement the modulus 2^64 in c for linear congruential generator LCG [migrated]

This is an implementation in C for linear congruential generator that has this formula: $$ X_{n+1}=a*X_{n} \bmod m $$ Below are two versions of the linear congruential generator function, the first ...
1
vote
1answer
53 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
59 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
1answer
524 views

Which algorithm do you recommend for practical use to generate unique passwords for each website?

So, in my imagination there is this simple algorithm with only one master password, let's say a prime number 'p', which I have to remember. Using only the address of the website and p, the algorithm ...
1
vote
1answer
291 views

Value of new symmetric key algorithm

When I was in grad school, I invented (discovered?) a new PRNG algorithm. This algorithm has an infinite period length (given infinite memory). This in itself cannot be new, because all you need to ...
2
votes
1answer
82 views

Is there a term for cryptographic attacks where you can verify decryption without assuming any known structure on the plaintext?

The questions https://security.stackexchange.com/questions/1696/if-someone-breaks-encryption-how-do-they-know-theyre-successful and https://security.stackexchange.com/questions/119887/how-to-know-if-a-...
1
vote
0answers
36 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
2answers
150 views

Is there an efficient algorithm that allows to construct a cryptographically secure $n$-bit hash function based on two unkeyed $n$-bit permutations?

Let $f(x)$ and $g(x)$ denote two independent, “ideal”, unkeyed, public $n$-bit permutations (two publicly known bijective functions that produce $n$-bit outputs from $n$-bit inputs), where $n$ is an ...
4
votes
2answers
281 views

Cryptography scheme to prove you really are the author for something

Say I'm a researcher like Satoshi Nakamoto that wants to stay anonymous. I want to publish documents and sign them somehow. A few years, I want to reveal my identity and prove it was me who was ...
1
vote
1answer
641 views

Padding Oracle Attack with AES-128-CTR and MAC

Assume Alice and Bob are communicating using 'MAC then Encrypt' paradigm. Specifically, they are using HMAC with SHA256 as the hash function and the output is truncated to 40 bits. They are using AES-...
8
votes
1answer
358 views

What does “$<\!\!<\!\!<$” mean?

What does the symbol $<\!\!<\!\!<$ mean? It is normally followed by a number. An example: It would be appreciated if you could explain it in fairly basic terms.
10
votes
1answer
26k 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 ...
0
votes
1answer
68 views

Can the EdDSA signature scheme be customized with OpenSSL?

EdDSA has currently 2 signature scheme Ed25519 and Ed448 where 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
78 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
55 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
116 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
130 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 ...
26
votes
4answers
10k views

Is there a string that's hash is equal to itself?

I was wondering if there's any string that has a hash equal to itself, so that – when using any (none specific) hash function – the hash would be equal to that string? so that: ...
1
vote
1answer
118 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
49 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
101 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
72 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
30 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 ...
0
votes
2answers
945 views

If the first key-bit is flipped, which DES s-boxes are affected?

Instead of the input bit being flipped... if the 1st bit of the key is being flipped, which s-boxes are affected during encryption/decryption of DES?
1
vote
0answers
38 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 -...
0
votes
0answers
27 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 ...
0
votes
0answers
35 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?
4
votes
1answer
51 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
76 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
35 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 ...
5
votes
1answer
770 views

One ciphertext, multiple keys, multiple messages

I recently came across following idea, does anyone know a name and if it is actually used? A wants to send B a message (A and B know both have a common secret key) and C wants to intercept it (...
1
vote
1answer
32 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
58 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 (+ - / *, ...
8
votes
6answers
4k views

Crypto-Compression Algorithms?

I was wondering, whether there exist such algorithms/enciphering procedures which both compress and encrypt the input data. That means, for starters, the output will be both smaller in size and ...
0
votes
0answers
20 views

Finding the relationship between generating elements represented by a Hamiltonian cycle of a Cayley graph (like in strong RSA condition)

Consider an undirected Cayley graph of a finite group $\mathbb{Z}_p \times \mathbb{Z}_q$, where $p$ and $q$ are distinct primes. Let the generating set for the Cayley graph be $S=\{g_p, g_q\}$, where $...
0
votes
0answers
42 views

How could I verify that a contract was actually sent to me from the client as soon as the contract is received?

with the information provided - what would be the best solution - something like document management program like IBM Filenet ? or trusted timestamping? If I want to store electronic contracts for ...
0
votes
0answers
18 views

How to disperse personal data before returning?

I am working on a project that is dealing with personal data. The task is to find a method such that when user makes a query into multiple institutions, the result will contain already scattered/...
0
votes
0answers
40 views

WPA/WPA password algorithm

I would like to understand the mechanism behind wpa/wpa2 algorithm. Is there any script that can put this theory:(Key = PBKDF2(HMAC−SHA1, passphrase, ssid, 4096, 256)) into action to test it ? I made ...
1
vote
1answer
59 views

What are the standard properties of an S-Box [duplicate]

Apart form the following, what are the other properties of a good cryptographic Substitution box or the S-Box: Changing one input bit should change about half of the output bits. Each output bit ...
1
vote
2answers
137 views

Concerns about use of MAC in my specification

Here is the pseudocode for a routine I am designing: ...
1
vote
0answers
23 views

How does one ensure that a handshake protocol is secure assuming all underlying cryptography used are secure

Suppose one have to design handshake protocol using known secure cryptographic algorithm. The designer of implementer can assume that crypotography is secure but how would they ensure protocol itself ...
0
votes
1answer
35 views

With the random numbers generated, can I know which RNG seed was used?

My teacher challenged us to find out which seed was used to generate some random numbers. I would like to know if it is possible to decipher the seed using the generated numbers (break the linear ...
1
vote
1answer
63 views

Are there any algorithms for which generating any zero-knowledge proofs is not practical?

It is related to my earlier question: Can zkSNARK or other zero-knowledge proofs be used to proof message authenticity without revealing private key? Are there any algorithms for which generating ...

1
2 3 4 5
15