Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
1answer
97 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 ...
1
vote
1answer
63 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: ...
2
votes
2answers
175 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
89 views

finding encoding based collision

For example, If I enter as a sample "hello world" in English, how hashing protocol generates a hash of it? is in the first step, change it to ASCII or Unicode or Binary? What if I find a word in other ...
1
vote
3answers
66 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. {"alg":"SHA1","typ":"JWT","iat": "Sep ...
4
votes
3answers
159 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
128 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
88 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
129 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
53 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 ...
3
votes
2answers
285 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, ...
19
votes
7answers
5k 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/...
0
votes
1answer
296 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
60 views

Are HTML entities considered a form of cryptography?

For example, I could use these html entities to encode purchase data, ...
0
votes
1answer
757 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
69 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 ? ...
0
votes
0answers
44 views

Can we still verify a RSA signature if the modulus changed

Since we know $s = m^d \bmod n$, and when we do verification, we compute $s^e \bmod n$ to recover $m$. what if $n$ changed to $n\cdot p$, where $p$ is a prime. Can we still do the verification on $s$...
-3
votes
1answer
106 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
120 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
2k 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
82 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
94 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
156 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
246 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
46 views

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

It's an answer to RPC call to program written in delphi. ...
0
votes
1answer
3k 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
339 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 ...
3
votes
1answer
248 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
138 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
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, /...
-1
votes
2answers
403 views

Is MD5 neither encryption nor encoding? [duplicate]

Article saying it used as hash function producing a 128-bit hash value. It can still be used as a checksum to verify data integrity, but only against unintentional corruption. So when it's neither ...
14
votes
1answer
3k 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): ...
8
votes
1answer
5k views

Encoding vs. Compression vs. Encryption

In what ways does encryption differ from proprietary/secret compression schemes and codecs?
3
votes
2answers
347 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 ...
2
votes
1answer
181 views

SHA-1 requires utf-8 and reordering of bytes

Today I implemented SHA-1 in JavaScript. While doing so I stumbled upon two requirements which are not mentioned in the RFC-3174. Text is supposed to be utf-8 encoded / one character should be 8 bit ...
2
votes
2answers
165 views

Scalar product of vectors over polynomial rings

I have been studying about homomorphic encryption (HE) lately, and I am trying to perform simple computations over encrypted data. Specifically, I am interested in the scalar product between two ...
1
vote
2answers
97 views

Clarification on Size of an Encryption Key

Given a key with a certain key size (e.g., 64bits). Would I be correct to interpret this as 8 characters (since each character would be 8 bits under ASCII encoding)? Because the ASCII scheme is ...
3
votes
1answer
1k 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. ...
0
votes
4answers
104 views

Is XORing a random stream of bytes a secure way to obscure a file?

Long ago I created a very simple program that used the C library's rand method to generate bytes to XOR with the bytes of a file. This was a reversible (just run it through again) method to make a ...
-1
votes
1answer
529 views

Is “6 bit packed ASCII” an effective encoding to obscure text data?

I wrote a routine for a former employer that took the low six bits of ASCII text and "compressed" by cramming the bits together, so that 4 bytes reduced to 3. This had the advantage of automatically ...
2
votes
4answers
809 views

Is this an effective obfuscation technique?

Long ago I created a simple program which obfuscated a file by taking the first byte, then XORing it with the second, taking the (original) 2nd byte and X-ORing with the 3rd, etc, down the line. The ...
3
votes
1answer
308 views

What do the last chunks of the output string of Scrypt contain?

When you use scrypt to hash a string, it will generate something like: ...
0
votes
1answer
540 views

Do RSA keys contain a checksum mechanism? [duplicate]

I'm new to cryptography, and I was making an experiment a few minutes ago, but I want to have some deeper knowledge about RSA public and private keys. I have a set of keys One begins with ...
7
votes
3answers
984 views

Encryption-then-encode or encode-then-encryption?

I have this question in which I m struggling. I have read in many sites about encrypt-then-mac etc. If the confidentiality for transmission is needed, discuss the feature for the order of encryption ...
4
votes
1answer
428 views

Numeric base conversion in cryptosystems?

I have been wondering if numeric base conversion has ever found an application in cryptography. By base conversion, an example that is probably familiar is Base64 encoding. This is an example of ...
11
votes
2answers
405 views

Do I need to worry about timing attacks in Base64 encoding/decoding of private keys?

Do I need to worry about timing attacks in Base64 encoding/decoding of private keys? This is a common operation (ex. PEM keys) and is variable time in typical implementations.
1
vote
1answer
126 views

Huffman coding is a prefix code, proof [closed]

How would you prove that Huffman coding $C$ is a prefix code, i.e $$\forall x,y \in C,\ \forall z \in \lbrace 0,1\rbrace^*,\ x\not=y||z$$ Using induction according to the number of items to code? ...
1
vote
1answer
337 views

How to calculate secret key size of a CP-ABE scheme

How can I calculate the real size of key in a CP-ABE scheme. For example, I have this GSWV scheme: Fuchun Guo, Willy Susilo, Duncan Wong, Vijay Varadharajan: CP-ABE with constant-size keys for ...
0
votes
1answer
242 views

How to encode a message to MD5?

I have faced a problem to understand MD5 algorithm.My question is weather the original input message is converted to binary value in MD5 before using the input message as parameter in four Feistel ...
0
votes
3answers
491 views

Algorithms for Cyrillic encryption

I am working on a cryptography application which is to be used in my country. I tried looking up to see if there are any algorithms that support the Cyrillic alphabet, but I found none. Do you know of ...