Questions tagged [block-cipher]

A block cipher is a keyed bijective function (also pseudo-random permutation). If your question is not directly related to programming, check if the question fits better on https://crypto.stackexchange.com/ or https://security.stackexchange.com/

136 questions
0
votes
1 answer

System.IndexOutOfRangeException on input block cipher using c#

I try to do a binary input into a block cipher with 256 bit long, with its own pattern. using input class private string inputBinary(string binary_, string rule) { var positionArray = rule.Split("\t\r\n, ".ToCharArray(),…
0
votes
0 answers

Schannel Cipher Naming Convention

I'm looking into disabling certain ciphers and I'm trying to wrap my head around how the block ciphers are named in Windows. Specifically what the numbers follow the name mean. For example, RC4 40/128, DES 56/56, AES 128/128 or AES 256/256. I…
skreel
  • 11
  • 1
  • 4
0
votes
1 answer

Block or Stream Encryption?

I want to know if data stored in encrypted form is encrypted by block-cipher or a stream-cipher? I have encrypted data, how do I check that it comes from a block or a stream cipher?
bhartay
  • 1
  • 2
0
votes
1 answer

Threefish block cipher, ECB, .NET implementation: encrypted and decrypted (initial plaintext) strings' lengths are different

I am encrypting and decrypting a string in .NET, using ECB cipher mode and Threefish symmetric block cipher, whose implementation I've attached to my project as a .dll Here's the link to .NET implementation Key size is equal to block size and is 256…
Laffy
  • 13
  • 3
0
votes
1 answer

AES 256 Encryption/Decryption initialization vector confusion

Let me start by saying that I am new to the encryption arena. With that said, I am developing an application and need to store username, password and full name (first, middle, last) encrypted in a database table. I was reading an article that the…
user1790300
  • 2,143
  • 10
  • 54
  • 123
0
votes
1 answer

AES-128 CBC decryption

I have written this code in java in order to decrypt a ciphertext. I have the key. Everything seems correct to me but I have the problem that I'm gonna explain. Here is my code: import javax.crypto.Cipher; import…
samantha
  • 3
  • 2
0
votes
1 answer

How to properly work with file upon encoding and decoding it?

It doesn't matter how I exactly encrypt and decode files. I operate with file as a char massive, everything is almost fine, until I get file, which size is not divide to 8 bytes. Because I can encrypt and decode file each round 8 bytes, because of…
Rocketq
  • 5,423
  • 23
  • 75
  • 126
0
votes
1 answer

Does this code qualify to be a block cipher

Ok, before you guys reprimand me : I am aware this is a horrible code and super weak cipher. I just trying to find out if the following qualifies to be a block cipher ( even a very rudimentary and weak one ) int main(){ int mac = 123; int key…
sukhvir
  • 5,265
  • 6
  • 41
  • 43
-1
votes
3 answers

Caesar Encryption in C

Hello I am working on a Caesar encryption program. Right now it takes as an input the file with the message to encrypt, the key The input is currently in this format: "text.txt", "ccc" I need to convert this into taking a number so that it fits my…
madlee
  • 11
  • 2
-1
votes
1 answer

C++ adding spaces to a string of words

For example I have a cipher text code "KWSVVSYXKSBOKRKBNRKDKXNKNBEXUKBOKDKLKBGRO" I used some frequency analysis calculations on it and started reverse engineering to break the cipher. My Solved cipher text is "New solved cipherr text with key is…
Caesar Krit
  • 204
  • 4
  • 19
-1
votes
1 answer

How to fix the difference in precision between double data type and uint64

I'm in the process of implementing Three Fish block cipher using MATLAB. At first, I implemented the algorithm on uint8 numbers to validate my code. Every thing was OK and the decryption was successful. But when I replaced the numbers to uint64 the…
Naseem
  • 39
  • 6
-1
votes
1 answer

How reliable is Java crypto cipher in encrypting data?

I'm trying to learn Java Cipher Crypto and just have a few questions about my code below: public class Main2 { public static void main(String[] args) { Cipher cipher; KeyGenerator keyGenerator; SecureRandom…
Jae Bin
  • 49
  • 1
  • 2
  • 10
-1
votes
1 answer

Triple DES with CBC mode : java.security.InvalidAlgorithmParameterException: Wrong IV length: must be 8 bytes long

I am trying to implement a 3DES encryption/decryption with CBC mode in java. The initialisation vector is 0000000000000000 Encrypted string is DD446C051A83BFD98144C348935C61D81398CF29CCFE1CCD Key for decryption is DCBA4F836E45BAB04FAB2937454075D9 I…
Preetam
  • 49
  • 2
  • 8
-2
votes
1 answer

How to encrypt and decrypt with RC6 using Crypto++

I want to encrypt and decrypt strings with RC6 but I don't understand how it works with the Crypto++ library, could you give me a snippet ? Thanks you !
dirac
  • 1
  • 1
-3
votes
1 answer

AES-CCM encrypted message length

Explain me this please: I encrypted 1 byte plain text by AES-CCM with 8 byte MAC. Result is 9 byte long. I thought that AES is a 16 byte block cipher, so the result must be 24 bytes long, but it isn't. It is definitely not a bug in my code, because…
ifs
  • 41
  • 7
1 2 3
9
10