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.

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.

143 questions
52
votes
5 answers

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 typical public key is expressed in base64, and is…
user3001408
  • 623
  • 1
  • 6
  • 5
44
votes
1 answer

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 AAA\n\rBBB\n\rCCC\n\r is this the same as AAABBBCCC
xpepermint
  • 543
  • 1
  • 4
  • 5
21
votes
8 answers

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/password). But also, no portion of the original…
bhazzard
  • 311
  • 1
  • 2
  • 3
14
votes
1 answer

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…
13
votes
3 answers

Why do we use hex output for hash functions?

Why do we use hex representation as default for the output of a hash function's result? For example, the SHA-256 hash function: the output of SHA-256 in hex representation uses 64 characters, while using Base64 on the raw output produces 44…
Neil Yoga Crypto
  • 313
  • 1
  • 4
  • 11
12
votes
1 answer

Encoding vs. Compression vs. Encryption

In what ways does encryption differ from proprietary/secret compression schemes and codecs?
12
votes
4 answers

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.
Demi
  • 4,853
  • 1
  • 22
  • 40
10
votes
3 answers

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 and encode by error correcting code (ECC), i.e.,…
nmurshed
  • 101
  • 1
  • 3
8
votes
3 answers

Using 32 hexadecimal digits vs equivalent 16-character string 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 instance the string is: Z±¨Û‹'bó£´µ¼ The…
Hannah Vernon
  • 183
  • 5
  • 11
8
votes
3 answers

How to perform frequency analysis of a substitution cipher using a Base64 alphabet

Let's imagine 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, -, _, =). The shuffled alphabet is, in essence, the…
7
votes
2 answers

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 point from a plaintext message? Is it simply…
Maarten Bodewes
  • 96,351
  • 14
  • 169
  • 323
7
votes
3 answers

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 used, the underlying binary data and therefore the…
Sutarbi Dudek
  • 101
  • 1
  • 6
6
votes
1 answer

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 the hash of the union of the multisets should be…
6
votes
2 answers

Would it be better to split a file and then encrypt, or vice versa?

Assuming that you are paranoid before storing your file (distributed across a shared location), which will be the best case scenario: splitting the file first and then encrypting or encrypting first and then splitting?
Runcy Oommen
  • 161
  • 1
  • 4
6
votes
3 answers

How do I test my encryption? (absolute amateur)

I am a hobby programmer with a background in biology and have developed an encryption program based on DNA. I tried to make it hard to crack, but it's essentially a substitution cipher and uses the default Java random number generator so my guess it…
user137
  • 169
  • 1
  • 3
1
2 3
9 10