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
1
vote
0 answers

POST request to google analytics API with encrypted parameters throws Invalid grant type error

I am trying to generate the Access Token using Refresh token from Google Analytics API. The request which I am trying to send is encrypted using Python libraries. When I run the below code, I am getting {'error': 'unsupported_grant_type',…
sac
  • 175
  • 2
  • 14
1
vote
1 answer

I amgetting System.Security.Cryptography.CryptographicException: 'Length of the data to decrypt is invalid.'

The encryption works fine but I get the exception while decrypting the cipher text. The cipher text is generated via encrypting 'Test' Cipher text: u1jeSfKVfSRfSieLX01/uQ== string encrypt(string plainText) { AesManaged aesCipher =…
1
vote
0 answers

Is there a way to generate same encrypted value while encrypting same text using aes 256?

I have a requirement of of encrypt and decrypt the text but each time the encryption value of same text should be generated same. Suppose if I am encrypting a text "My Name is John". And while encrypting first time its value was generated…
1
vote
0 answers

How do i parallelize a ECB-block cipher?

I tried to parallelize my block cipher but it doesn't work right. The code can run but the result is different from not using parallelize .I'm a newbie to OpenMp. The code works fine with out OpenMp. Hereis the code with also every function. And…
Huy By
  • 23
  • 4
1
vote
1 answer

Purpose of EVP_EncryptFinal_ex function in OpenSSL

I'm trying to implement AES symmetric encryption using the OpenSSL library. In the encryption examples, after calling the EVP_EncryptUpdate function, the EVP_EncryptFinal_ex function is immediately called. What is the purpose of calling the…
John
  • 63
  • 6
1
vote
2 answers

What is the SWAPMOVE function in block cipher?

I saw a function called 'SWAPMOVE' below. SWAPMOVE(A,B,M,n): T = (B ^ (A >> n)) & M B = B ^ T A = A ^ (T << n) And I don't know what does this function actually do. It seems to calculate the linear layer of some block ciphers, but I…
1
vote
0 answers

try to open enryption file with AES in Flutter

i encrypt file and store it in folder with AES Encryption the name store in folder like fileName.aes but when i try to decrypt it i got this message error : Unhandled Exception: FileSystemException: Cannot open file, path =…
1
vote
1 answer

Python: AES.MODE_CFB decoding issue / get initial input back

I'm trying to encode and decode a byte string using Crypto.Cipher library in Python. The code for encryption is: message = b'Hello world How are you Have a great day' key = pad(b'Hello world', 16) iv = os.urandom(16) encryptor =…
Ksenija
  • 31
  • 4
1
vote
0 answers

iOS using CryptoSwift Encryption AES/CBC/PKCS5PADDING Equivalent encryption with java not working properly

I am building a swift application where I need to have AES/CBC/PKCS5PADDING Encryption type. To encrypt API params and decrypt API response. I have successfully added in android java and that works fine. Now I am trying to implement the same formate…
Hitesh Matnani
  • 533
  • 2
  • 8
  • 26
1
vote
1 answer

How to construct radomized CTR mode?

How can I change this deterministic counter mode to randomized counter mode cipher? I learned that we have to set a fixed counter value to random one... I don't know how to do it... Can someone explain it in detail? Coding noob requires a detailed…
user11594234
1
vote
1 answer

Need library for the 3-DES cipher that supports 1-bit feedback cipher modes

I couldn't find a java library that supports the CFB, OFB or CBC mode in the 1-bit stream mode. So far, the libraries I've tried (BouncyCastle and IAIK) only support ranges 8-64.
jackusz
  • 11
  • 1
1
vote
1 answer

How to use CryptoApi in order to encrypt more then one block size of buffer with AES-128

I need to encrypt data whose length longer than the block size(128 bits) using windows CryptoApi and aes128 CBC mode. Iv'e tried multiple ways in order to achive this goal, none worked correctly. I know the theory behind chaining and I theoretically…
jony
  • 41
  • 6
1
vote
1 answer

What does 4-bit OFB TEA encryption mean?

I have come across the following task: Implement a 4-bit OFB TEA algorithm which I don't understand fully. As far as I understand the TEA algorithm, it encrypts/decrypts 64 bits at a time. There's a variant of it called "Block TEA" which allows…
1
vote
3 answers

Looking for Java implementation for decrypting a message encrypted using openssl -aes-256-cbc -a -salt command?

I am looking for any sample java code that will decrypt the messages encrypted using "openssl enc -aes-256-cbc) -a -salt" command provided the key is known. https://pastebin.com/YiwbCAW8 So far i was able to get the following java code that encrypts…
bStk83
  • 19
  • 5
1
vote
0 answers

Where to find block cipher modes in a TLS Cipher Suite

I'm working on finding out the TLS Cipher Suite being used on a TLS Connection by using System.Net Trace Listener, in a C# program. I get the following details in the Trace log file: System.Net Information: 0 : [42820]…
Sharath
  • 111
  • 1
  • 9