Questions tagged [stream-cipher]

A cryptostream is a stream that implements a stream cipher, which is a symmetric encryption algorithm that encrypts arbitrary length input stream of plain text, using a cipher stream (key) to produce an output stream of ciphertext.

What is it?

A cryptostream is a stream that implements a stream cipher.

A stream cipher is a symmetric encryption algorithm which encrypts arbitrary length stream of plain text, using a cipher stream (key) to produce a stream of ciphertext.

How does it work?

Symmetric encryption algorithm are subdivided in block ciphers and stream ciphers. Block ciphers encrypt fixed blocks of plaintext bits. Stream ciphers encrypt each plain text digit one by one.

So a stream cipher converts a stream of plaintext into a stream of ciphertext in real-time.

The .net framework offers a CryptoStream class that implements a stream cipher.

See also

36 questions
16
votes
6 answers

Is there any legitimate use for Intel's RDRAND?

Today I thought: well, even if there is great suspicion on RDRAND implementation of NIST SP 800-90A, it is still a hardware implementation of pseudo-random number generator (PRNG) that must be good enough for non-sensitive applications. So I thought…
lvella
  • 12,754
  • 11
  • 54
  • 106
6
votes
3 answers

Python: Is there a good way to check if text is encrypted?

I've been playing around with cryptocat, which is an interesting online chat service that allows you to encrypt your messages with a key, so that only people with the same key can read your message. An interesting aspect of the service (in my…
Michael Smith
  • 1,847
  • 2
  • 19
  • 19
6
votes
7 answers

C Symmetric Stream Cipher

Does anyone have a good implementation of a stream cipher written in pure portable C? I am not terribly concerned with the strength of the cipher at this point in time because it is only for a proof of concept, but speed would be important. I've…
Steven Behnke
  • 3,336
  • 3
  • 26
  • 34
3
votes
4 answers

AES-CTR mode (streaming-like encryption) a 1 bit change in plaintext changes 1 bit in ciphertext?

From what I understand, in stream-cipher (or AES CTR mode) the key is actually being encrypted using the IV (or in general, from key K we produce pseudo-random bytes). Than, we use this key to encrypt the plaintext using XOR. But from what I…
TCS
  • 5,790
  • 5
  • 54
  • 86
3
votes
5 answers

Software tools to automatically decrypt a file, whose encryption algorithm (and/or encryption keys) isn't known?

I have an idea for encryption that I could program fairly easily to encrypt some local text file. Given that my approach is novel, and does not use any of the industry standard encryption techniques, would I be able to test the strength of my…
Andrew
  • 31
  • 1
  • 3
1
vote
1 answer

Why stream cipher are always symmetric?

Is a stream cipher algorithm (Encryption) has to be always symmetric? Wikipedia has mentioned it but without a reason. This site also portrays some information about it, but not clearly why only symmetric keys are used to encrypt stream cipher but…
Abhiram
  • 19
  • 2
1
vote
0 answers

Cryptography: Question about streamcipher

My question is in Daniel J. Bernstein's ChaCha20, only nonce and counter changes each block. With nonce and counter, they are totally 128 bits, however, it produces 512 bits keystream blocks. If we use the concept …
MrQ.
  • 21
  • 1
  • 3
1
vote
1 answer

‘ChaCha’ has not been declared in this scope using Crypto++?

I am trying to create a program that run ChaCha encryption. However, I kept getting this problem testingchacha.cpp:38:5: error: ‘ChaCha’ has not been declared ChaCha::Encryption enc; I tried to change the code…
Afiq
  • 23
  • 4
1
vote
2 answers

How to convert a system of non-linear XOR equations to CNF

I'm trying to analyse phase shift fault analysis in trivium and came across a system of non-linear equations to solve. I read about sat-solvers and Gaussian elimination but unfortunately, none of the articles I found on the internet shows how to…
1
vote
1 answer

C RC4 super weird behavior

so I found the implementation of RC4 in pure C, which I was using on my website. It was working super good except when I input a 6 characters string. Then I get the Internal Error Page. Figured out that only this length causes a…
1
vote
1 answer

Why TransformBlock(byte[1]) twice not the same as TransformBlock(byte[2])?

In the C# implementation of the salsa20, if I call the method TransformBlock two times on a block of size 1, it is different than calling it a single time on a block of size 2, this is problematic when you use this class to encrypt objects sent via…
Morad
  • 734
  • 5
  • 14
1
vote
2 answers

Is authentication required/recommended with a stream cipher?

I want to secure the communication of a TCP-based program using a shared passphrase/key. The easiest way to do that without having to deal with block size, padding, ... is to directly use a stream cipher. Doing that way, the amount of data is not…
math
  • 2,811
  • 3
  • 24
  • 29
1
vote
1 answer

Writing a stream cipher for DCPU-16, which should I focus on given it's limitations?

For fun I am writing a stream cipher in assembly for the DCPU-16 (the fictional CPU for the game 0x10c). The processor only has 16 bit registers and it runs at 100 Khz. However, for now, memory access and things like multiplication and division are…
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
0
votes
3 answers

After encryption, an exe file becomes non-executable

After writing a basic LFSR-based stream cipher encryption module in C, I tried it on usual text files, and then on a .exe file in Windows. However, after decrypting it back the file is not running, giving some error about being a 16-bit. Evidently…
AruniRC
  • 5,070
  • 7
  • 43
  • 73
0
votes
1 answer

How to create true random number generator using atmosphere noise(recorded mp3, wave etc) on python?

I need to convert audio atmosphere file to bit to use it as a secret keys in stream cipher cryptography. I don't know the logic of converting audio file to bits.
1
2 3