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
0
votes
0answers
5 views

How to feed OpenSSL HMAC function with the counter via CLI for rfc4226? [migrated]

I have problems feeding the counter needed to compute a one-time password with OpenSSL HMAC via cli. I believe my problem is with encoding of the counter.I cannot reproduce the test vectors in RFC: ...
1
vote
2answers
62 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 ...
2
votes
1answer
167 views

Encoding a message to a point of curve y^2=x^3+7 and Bitcoin Core

Where should I look at in Bitcoin Core source code to figure out how the signature process transform a message in a curve point? To sign a transaction (message) in the Bitcoin system, you need to ...
21
votes
8answers
6k 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/...
4
votes
1answer
134 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 ...
0
votes
2answers
155 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
84 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
107 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: ...
0
votes
1answer
502 views

Huffman encoding of hashes

I have a huge list of MD5 hashes, which takes up quite some space. I wonder whether I would achieve (some) compression by encoding the characters (which are A-F 0-9), with Huffman coding. I made a ...
28
votes
5answers
74k views

How to find modulus from a RSA public key?

I am studying the RSA cryptosystem. The public key consists of $(n, e)$, the modulus (product of two large primes), and the encryption exponent. I want to separate the modulus $n$ and exponent $e$. A ...
32
votes
1answer
39k views

Can I remove newlines in a public key?

Can I remove new lines from the RSA public key file to get a one line string? So the question is if the key looks like this AAA BBB CCC or ...
1
vote
0answers
34 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
votes
1answer
196 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
0answers
46 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
42 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
152 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-...
2
votes
1answer
83 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 ...
0
votes
1answer
67 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}$ (...
1
vote
3answers
451 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. ...
1
vote
1answer
557 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
228 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
383 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
532 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 ...
4
votes
3answers
414 views

Encrypt-then-MAC with base64

I've a doubt about the Encrypt-then-MAC approach when using HMAC-SHA256 with AES128 in CBC mode, as seen in https://en.wikipedia.org/wiki/Authenticated_encryption. I need to encode the resulting ...
1
vote
3answers
295 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
613 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
352 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
165 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
1answer
2k views

What are I2OSP & OS2IP in RSA PKCS#1?

I started working with RSA two weeks ago. But I couldn't really understand how exactly I2OSP & OS2IP are working. I am using some open source for signature verification through RSA PSS algorithm. ...
3
votes
2answers
301 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, ...
0
votes
1answer
567 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
66 views

Are HTML entities considered a form of cryptography?

For example, I could use these html entities to encode purchase data, ...
0
votes
1answer
4k 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
91 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
113 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 ...
3
votes
1answer
202 views

How can you tell the type of encoding being used?

$2y$05$68LWs2pXiEvhVTacJ9PX/elfa1zq9jCBlv61hEw1pCvAHlaJyeMwW This hash value is 70 characters long. How can I tell what type of encoding was used to generate it? ...
5
votes
3answers
3k views

Using 32 hexadecimal digits vs ASCII equivalent 16-character password

Assume I'm using a cryptographic algorithm to pseudo-randomly generate a string that is specified to be 16 characters long. The string will be used as a passphrase when encrypting a file. So, for ...
2
votes
1answer
95 views

Size of bitwise OR between vectors represented as polynomials

I am using polynomials to represent bit vectors, such that the value of the d-th coefficient is $1$ if the d-th bit in the vector is $1$, and $0$ otherwise. For example, the vector $A = [1, 1, 0, 1, 0]...
0
votes
2answers
141 views

Keys and mixed encoding - security implications

Let's say we generate a 256-bit key like: secret = base64(csprng(32)). Assume someone using the secret ascii-decodes the base64-encoded string and uses the output ...
5
votes
2answers
186 views

Steganography in speech by adding extra “filler” syllables [closed]

PREAMBLE About 20 years ago, when reading a novel (set in late 1800) by some classic Russian writer I came across very curious example of steganography. The two main characters were peasants who got ...
2
votes
1answer
277 views

RSA: Given $n$ and $\varphi(n)$, find $e$ such that $e=d$

Say we have chosen $n=pq$, with $p=89,q=97 \implies n=8633$ and $\varphi(n)=88\times96=8448$. Also, if we want the encoding ($e$) and decoding ($d$) exponents to be equal, we need $$(e,8448)=1 \: \: \...
-1
votes
1answer
50 views

What type of data encoding could it be? [closed]

It's an answer to RPC call to program written in delphi. ...
1
vote
1answer
6k views

How to solve encryption with ASCII output

There are lots of text files which have unknown data packets with ASCII output (no available plaintext exists with regard to any ciphertext, I have only encrypted outputs). The input data is known to ...
2
votes
1answer
2k views

How to decrypt a substitution cipher using a Base64 alphabet [duplicate]

Let us consider a cipher that works like the following: Plaintext is encoded to Base64. The characters in the encoded plaintext are substituted with a randomly shuffled character set (a-z, 0-9, A-Z, /...
2
votes
1answer
498 views

why does TTLV encoding in KMIP require padding?

I study the KMIP in OASIS standard, I need some help. Integers, Enumerations, and Intervals in KMIP length shall be padded with four bytes. the reason for padding in kmip is need to match the right ...
14
votes
1answer
4k views

How to find the encoding of an RSA public key?

What practical methods is there to reconstruct an RSA public key in unknown format? As an illustration, in a database I find this (which doesn't look like ASN to me): ...
2
votes
1answer
350 views

Why is garbled circuit a randomized encoding?

In Garbled Circuit, a circuit C is encoded to C' and input x is encoded to x' such that only C(x) can be computed given C' and x'. Randomized encoding of a function f is another randomized function f'...
-1
votes
1answer
156 views

Is it safe to encode an entropy this way?

I have been analyzing the source code of a software, and I came across this encoding snippet, I would like to know if it's safe to encode an entropy source this way. So the entropy source is a 132bit ...
3
votes
2answers
494 views

Can a Deterministic Signature Algorithm be paired with a Probabilistic Encoding Method?

I'm working with a C++ library and I’m currently investigating the changes needed to accommodate Deterministic DSA and ECDSA Signatures (RFC 6979). While the RFC 6979 changes are specific, I'm trying ...
3
votes
1answer
9k views

Decoding base64 encoded message with a key

I am pentesting a database that where I found data which was base64 encoded. I tried the usual method of decoding base64, which didn't work. Later, I found in ...