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.

Filter by
Sorted by
Tagged with
2
votes
1answer
45 views

How to encode and decode message into polynomial form on NTRU

This question is based on a previously asked question. How to make a message into a polynomial on NTRU encryption? I am tasked to implement NTRU with toy parameters such as $N=7$ or $N=11$ and I have ...
0
votes
2answers
77 views

How are ECC keys stored?

I am trying to figure out what typical formats and sizes, etc. are, for storing ECC public and private keys. Some quick research turned up X9.62 (to which I don't have access) and SEC1. But then there ...
1
vote
1answer
58 views

Should I calculate SHA-256 hash of a raw bytes of a token or it's hex encoding?

I have a system where I should generate a secret token for a user. The presence of a token is sufficient to grant access to some user-related data. I am generating a 4096 bit token from a ...
0
votes
0answers
44 views

Paillier scheme : Encoding floats into integers impact on computations

In Privacy Preserving Processing Over Encrypted Images, I could understand that appropriate encoding of floats into integers (required in Paillier) only incur negligible error in computations. Any ...
1
vote
1answer
38 views

Encode ASN.1 PKCS#8 Private Key with Public Key and attributes

I'm trying to encode an Ed25519 private key as a PEM file based on this document https://tools.ietf.org/html/rfc8410#page-7 . I'm using an ASN.1 encoder written in Dart, and I can encode the private ...
1
vote
1answer
49 views

PKCS RSA - Why do we need encoding [duplicate]

In the RSASSA-PKCS-v1_5 signature scheme, the first step is to perform an encoding on the hashed data. (0x00||0x01||PS||0x00||T). Is this encoding important for security ? What happens if the hash is ...
2
votes
1answer
20 views

Can you use a dynamic key and data size for KMAC?

I've asked before if some kind of canonical encoding should be used on the input parameters of SHA-3 before it could be used as replacement for HMAC. However, if I read the current NIST specifications ...
0
votes
2answers
116 views

Why use base64 or hexadecimals for ciphertext?

They are asking me to deliver encrypted text in ISO/IEC 8859-1. I have always encoded it to hexadecimal or base64. This text will be sent in a file with plaintext and encrypted text. In my opinion it ...
1
vote
1answer
155 views

Encrypting serialized data

If I want to encrypt structured data composed of key-value pairs of strings, would it be an advantage to use an encoding that stores keys, values and their lengths, and is padded with random numbers, ...
4
votes
2answers
238 views

Making a cipher non-malleable using a plaintext transform?

NOTE: By malleable/non-malleable, I mean the ability/or not to change a byte/block of the ciphertext and have it change only that byte/block of the plaintext. I understand that we use authentication (...
0
votes
2answers
62 views

How do I calculate Base64 conversion rate?

Basically I need to have a base64 encoded signature that has to be 96 characters long. However, I do not know what length I need to have the signature at so when I encode it, it can be that exact size....
1
vote
1answer
67 views

Metrics for Measuring the Distance of Two Numbers in Cryptography

Hamming Distance (HD) has been used to measure the distance of two numbers when they are converted into binary representations. e.g., $Ham(1, 2)=2$ as ...
1
vote
1answer
47 views

ChaCha matrix - tests for original implementation not passing due to bad counter encoding?

Hello everyone and already thanks for taking your time to read this! I am currently implementing ChaCha20 (256-bit key) for my bachelor thesis. I know that there are two version of ChaCha out there; ...
3
votes
2answers
380 views

XOR cipher with fixed key and known relation among plaintexts

I have three messages, each known to be XOR-encoded, with the same key used for each message of this XOR cipher. Encoded message 1: $e_1\,=\,00100111010$ Encoded message 2: $e_2\,=\,01001110110$ ...
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 ...
3
votes
1answer
658 views

Converting raw ECC private key into ASN.1 DER encoded key

I created a random integer array of 32 bytes to use as my private key for secp256k1 curve. ...
0
votes
0answers
15 views

Is the DBMS_CRYPT Oracle package used for the 'plug-in' method of DBMS encryption? Could anyone send links to more information on the method?

I was assigned a research project on the 'plug-in' method which is basically the concept of attaching an encryption package (encryption module) onto the DBMS. When typing in 'plug-in' method into ...
1
vote
0answers
55 views

keyboard communication protocol? [closed]

I'm analyzing the transmitted data from the apple Smart Keyboard to the iPad, and I have troubles arriving to a conclusion: When I press a key, the keyboard transmit two blocks of data: the ...
2
votes
1answer
169 views

XOR of 16-bytes variables gives a result of size not equal to 16

I'm trying to write a XOR code for implementing CBC mode of operation from scratch but i seem to have some problem.The function takes two byte variables of 16bytes and the expected output should be ...
1
vote
1answer
94 views

Proof that Niederreiter Cryptosystem is correct

I read about Niederreiter Cryptosystem. I understood the Key Generator, encryption and decryption of the cryptosystem, but if I want to prove that is a correct cryptosystem, what should I do?
6
votes
2answers
940 views

How to create an EC point from a plaintext message for encryption

It seems that ElGamal encryption is also possible for Elliptic Curve cryptography. However, that requires the user to convert the message to a point on the curve. What strategies are there to derive a ...
1
vote
2answers
181 views

SHA3 the Left & Right Encode Functions

In this paper (Section 2.3.1, Pg.5), I came across the left_encode and right_encode functions, and I have some questions about ...
0
votes
2answers
280 views

Does character encoding change entropy?

This is a question I've been wondering for a while. Technically these two strings have the same entropy I believe: ...
0
votes
0answers
173 views

Encoding function for ISO 9796-2

I try to reproduce the analysis conducted in this presentation by R. Lifchitz. Namely, data signed by an 1024-bit key $n$ (Rabin scheme) and following ISO/IEC 9796-2. From what I understand, for a ...
2
votes
1answer
597 views

“hex” vs. “base64” encoding when enciphering

Examining different implementations of encryption / decryption with cipher on Node.js, I paid attention that some implementations use hex encoding: ...
6
votes
1answer
169 views

Hash multiset to point on elliptic curve where $A = 0$

I want to hash a multiset to a point on the elliptic curve $y^2 = x^3 + 3$ over a finite field of some 254-bit prime order, where $P = 3 \pmod 4$. Moreover, I want this hash to be incremental, in that ...
1
vote
0answers
108 views

How to encode and decode 14-character codes with 20 specifically allowed characters as integers within the smallest range possible? [closed]

I am attempting to do phase space analysis on Coke Reward Codes that are 14 characters long and composed of only the following 20 characters: Letters: B F H J K L M N P R T V W X Numbers: 4 5 6 7 9 ...
1
vote
0answers
51 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)$. ...
0
votes
1answer
61 views

What is the opposite of embed?

We often embed items from one space into another space, e.g. embedding plaintext items from $\{0, 1\}^m$ into some ring $R_q/\langle x^N + 1 \rangle$ for RingLWE. What is the inverse of this action ...
1
vote
2answers
192 views

Can Reed Solomon parity blocks be used as an all-or-nothing transform?

Consider the following scheme: Perform an (N,N) Reed-Solomon encoding (i.e. N data blocks, N parity blocks) Drop the N data blocks and keep only the N parity blocks. Are these N parity blocks an all-...
0
votes
1answer
116 views

Does encoding a secret affect security?

My question is simple. I have a secret that is generated with a 10 byte long pseudorandom generator library (e.g. Java's SecureRandom), that in theory provides a security equivalent to $2^{40}$ (...
2
votes
1answer
175 views

Is there any identification for common encoding/encryption?

I come across lots of tokens which might be simply encoded and not random, but I don't know any way to identity if they are encoded or random, how to find is there any cheatsheet for the same. For ...
1
vote
1answer
2k views

How can you derive a P-256 public key from the X and Y points

Deriving a secp256k1 public key is also possible. For whatever reason, I'm only being provided X and Y, not the public portion. I just need to get the binary representation of the public key given ...
2
votes
1answer
484 views

Restoring a point on an elliptic curve

I received a representation of a point on an elliptic curve $GF(2^m)$ (with curve coefficient A, B) in specific format and some description how to decode it but not all is clear to me. I would be ...
2
votes
1answer
665 views

What is the encoding protocol for passphrase protected RSA private keys?

What is the protocol used to encode an RSA key protected with a passphrase? If I generate an RSA key with ssh-keygen -t rsa -b 4096 and do: ...
3
votes
2answers
979 views

Decrypt Base64 Encoded Monoalphabetic Cipher

I'm attempting to decrypt a body of ciphertext which has been encrypted using a monoalphabetic cipher. The trouble I'm having is that the plaintext was base64 encoded before being encrypted. In this ...
-1
votes
1answer
270 views

finding encoding based collision

For example, If I enter as a sample "hello world" in English, then the hashing protocol by encoding the text to binary strings makes the hash. What if I find a word in other languages like Hindi or ...
1
vote
3answers
819 views

Base64 encoding of strings

I have read everywhere that base64 encoding of unique binary/hex values results in unique output. The following two string encode to virtually the same output. ...
4
votes
3answers
536 views

Encrypt-then-MAC with base 64

I've a doubt about the Encrypt-then-MAC approach when using HMAC-SHA-256 with AES-128 in CBC mode, as seen in https://en.wikipedia.org/wiki/Authenticated_encryption. I need to encode the resulting ...
4
votes
3answers
1k views

Is there a consensus on what text encoding to use when hashing a string?

Let's suppose we are hashing a string input from the user via keyboard. A string can be interpreted in many different text encodings (ANSI, UTF-8, UTF-16 and many others). Based on what encoding is ...
1
vote
3answers
2k views

RSA - How to change the encrypted numerical result into text?

I'm aware of the way that the original plain text is converted into a number by taking the ascii numbers of the byte array of the plain text, but doing things the other way around doesn't seem to work....
3
votes
2answers
685 views

Encoding Public Keys

We would like to encode ECDSA Public Key specifically keys generated using the ed25519 for storage . What is the best and less error prone method , for now we think about using Hex strings or Base64 ...
0
votes
0answers
273 views

Compact encoding of an elliptic curve point

I'm working on a project with elliptic curve cryptography (ECC), I'm using the secp256k1 library (the one that's used in bitcoin). My goal is to create the most compact platform-independent ...
4
votes
2answers
309 views

Is there an encryption algorithm that only adds minimal (if any) size compared to the size of the unencrypted data?

We are working on a project in which we will need to encode and encrypt 1 - 1.3 kb worth of data at a time. We need the result of each piece of data to be the same size it was before, or be smaller, ...
21
votes
8answers
8k views

Does keyless encryption exist?

Does there exist an encoding/hashing/encryption scheme whereby the original string can always be derived in its entirety given the entire encoded/hashed/encrypted string, and nothing else (no key/...
1
vote
2answers
1k views

What kind of ECDSA signature encoding is this?

I am trying to generate an ECDSA signature using ARM's CryptoCell 310 (hardware cryptography module) and verify the signature using mbedTLS software library. The harware module documentation says ...
-2
votes
1answer
71 views

Are HTML entities considered a form of cryptography?

For example, I could use these html entities to encode purchase data, ...
0
votes
1answer
6k views

understanding NTLM authentication

The flow is like this. Client sends GET to Server Server responds with 401 UNAUTHORIZED and the authentication protocol: NTLM Client re-sends the request including authentication information. I don'...
-2
votes
1answer
97 views

Would fragmenting data into several independent secured files would make a system Quantum-Resistant?

In 2018 IBM is making available the first quantum computers. This can be a disaster for most security systems based on computing power. Could this type of scheme bring a solution to this problem ? ...
-2
votes
1answer
131 views

Is it worth using custom encoding on top of standard encryption?

I am using standard encryption AES/CBC. I wonder if I can invest some time adding my own custom encoding/decoding after the encryption just as an extra security layer. Does it really add any value ...