Questions tagged [encoding]
Encoding is the act of transforming information from one form to another. In cryptography, encoding is typically used to refer to an unkeyed process that does not provide any security in itself, but just changes the representation of information into a more convenient form.
145 questions
4
votes
2
answers
598
views
Is it safe to ASN.1 encode big integer as ASN.1 OCTET STRING, instead of ASN.1 INTEGER?
I wish to have common ASN.1 encoding for all my numerical primitives, whether it is big int or encoded elliptic curve point. Almost always big ints are encoded as ASN.1 INTEGER, but I wish to encode ...
1
vote
0
answers
65
views
How to determine the algorithm used to generate a 48-byte header for encrypted files? [closed]
I am engaged in the translation of encrypted files. I have several files encrypted in the same way.
The files consist of two parts:
48 byte header example - ...
1
vote
1
answer
83
views
Permutations of Enigma Rotor Wiring
This is a simple question: How many different 26 position Enigma Rotors are possible? NOT including any other Enigma elements such as the plugboard, the reflector, starting positions ring settings, ...
0
votes
0
answers
37
views
Decomposable Randomized Encoding vs Information Theoretic Garbled Circuit
I have to compute a function that is in $NC^0$ or $NC^1$. In what situation will I prefer decomposable randomized encoding over the information theoretic garbled circuit? The protocol design requires ...
6
votes
3
answers
421
views
What is the entropy loss when encoding 32 bytes to UTF-8 with replacement errors?
I'm analyzing the entropy implications of the following Python code snippet used in an encryption context:
...
3
votes
1
answer
118
views
Are there real-world applications of non-malleable codes?
I've encountered numerous theoretical works on non-malleable codes (NMCs), including constructions for various tampering classes and improvements in efficiency or security models. Some notable ...
1
vote
1
answer
112
views
How could a bad actor efficiently manipulate severely truncated HMAC-based RNG outputs using SHA-256?
I have observed an RNG implementation using an HMAC with SHA-256 that takes serverSeed, clientSeed, nonce, and cursor as inputs. For the specific scenario, the cursor remains zero. The key detail is ...
0
votes
1
answer
59
views
Probability of encoded message using Weierstrass equation on NIST elliptic curve over prime finite field to return a quadratic residue?
Suppose we talk about NIST P-256 elliptic curve, and since finite field of an elliptic curve is a known prime number $P$, then approximately half of the Weierstrass equation results will be quadratic ...
0
votes
1
answer
142
views
Elliptic curve short Weierstrass equation that always returns a quadratic residue modulo curve field?
Currently I'm encoding my message using short Weierstrass equation $y^2 = x^3 + Ax + B$ and elliptic curve is NIST-P256, which has $A$, $B$ and $P$(elliptic curve field size) known. Encoding itself is ...
1
vote
1
answer
94
views
Why use coordinate-wise random rounding instead of regular rounding?
I've been reading a blog article on CKKS encoding and there they implement a coordinate-wise random rounding algorithm (which can be found in this paper) instead of the plain old rounding. The same ...
1
vote
0
answers
114
views
Sparse Packing for CKKS
Let $N$ be a power of two integer and $n$ be a divisor of $N$. We can encode a vector in $\mathbb{C}^{N/2}$ into the polynomial ring $R=\mathbb{Z}[X]/(X^N+1)$ as described in the original CKKS paper ...
0
votes
0
answers
126
views
What format to use to store private and public key in one file other than a PKCS12 keystore?
TLDR
I want to generate an X25519 keypair and then store it in a single file for easier handling, but I cannot use a keystore like PKCS#12.
Why
OpenSSL makes it quite easy to generate a private key in ...
1
vote
1
answer
146
views
Is injective encoding of a message important for Elliptic Curve ElGamal?
I'm trying to understand if using non-injective encodings for Elliptic Curve ElGamal encryption is dangerous.
A standard probabilistic encoding defined by Koblitz for elliptic curves over $\mathbb{F}...
0
votes
0
answers
45
views
How to express the Boolean cardinality constraint to CNF formulas
A Boolean cardinality constraint
$$\sum_{j=0}^{n-1}x_j=k,$$
where $x_j$’s are Boolean
variables, and $k$ is a non-negative integer.
How to express the Boolean cardinality constraint to CNF formulas?
2
votes
1
answer
245
views
Constant-Time Base64 Codec - Necessity and Implementation
As we know, the popular PEM format for textualizing private key binary blobs uses base64 encoding. Typical base64 codecs use look-up tables to find characters and byte values and pack them together, ...