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
2
votes
1 answer

What is AES/CBC/PKCS5Padding java equivalent in php?

I'm trying to port below java snippet to php but somehow the output generated from php is of no near match to that of java. What am I doing wrong? Java snippet: public static String generateChecksum(String requestId, String validationString) throws…
Mohammad Sharaf Ali
  • 569
  • 1
  • 4
  • 19
2
votes
1 answer

JSSEHelper does not provide the correct SSLSocketFactory for extablishing secure connection in Websphere 8.0

I was working with 8.0 version of Websphere application server. I was trying to get SSLSocketFactory from JSSEHelper. Although I have successfuly got the SSLSocketFactory I have successfuly got the SSLSocket from SSLSocketFactory I have…
Michael K
  • 111
  • 2
  • 8
2
votes
0 answers

Is there any way to disable weak cipher suites in jdk 1.6?

I'm aware we have the java.security file from 1.7 onwards, and we can set the disabled cipher suites there. Can the same be done in 1.6?
Zise
  • 123
  • 1
  • 1
  • 10
2
votes
1 answer

Getting error when hit blockcypher api laravel

Here is my code: public static function test(){ try{ $apiContext = ApiContext::create( 'test', 'bcy', 'v1', new SimpleTokenCredential('my_token'), array( 'mode' => 'sandbox','log.LogEnabled' =>…
Gaurav Gupta
  • 1,588
  • 2
  • 14
  • 21
2
votes
2 answers

Encrypting NULL

While using Javax.crypto ciphers (more specific AES128/CBC/PKCS5Padding), the doFinal throws a NullPointerException when passing null to it as method args. Is there a way to encrypt null so that when persisting it to the database, I don't store…
2
votes
5 answers

How to crack a weakened TEA block cipher?

At the moment I am trying to crack the TEA block cipher in C. It is an assignment and the tea cipher has been weakend so that the key is 2 16-bit numbers. We have been given the code to encode plaintext using the key and to decode the cipher text…
molleman
  • 2,934
  • 16
  • 61
  • 92
2
votes
2 answers

Proper way to add padding to byte slice in golang?

I'm trying to encrypt some data in go but it's hardly ever the correct cipher.BlockSize. Is there a "built-in" way to add padding or should I be using a function to add it manually? This is my solution now: // encrypt() encrypts the message, but…
hermancain
  • 1,452
  • 2
  • 18
  • 24
2
votes
1 answer

Ciphertext stealing in Java

So I have a school project that I am having some trouble with. We are given the encrypt method and then asked to create a decrypt method for it. public static byte[] encrypt(byte[] plaintext, BlockCipher64 cipher, long IV) { if(plaintext.length…
isaac6
  • 33
  • 4
2
votes
1 answer

Integrate custom block cipher in Java Card framework

I created some lightweight cipher in Java Card language and now I want to integrate them into the Java Card API.I noticed the javacardx.crypto.Cipher as well as javacard.security.Key classes. But it seems to me that if I extends the Cipher class and…
Alberto12
  • 509
  • 2
  • 16
2
votes
1 answer

Understanding fitness function

I am working with use of genetic algorithm to break transposition cipher. So in this work I have come across to a paper named Breaking Transposition Cipher with Genetic Algorithm by R. Toemeh & S. Arumugam. In this paper they have used a fitness…
2
votes
1 answer

How can I disable 112 bits cipher suite in SSL of a java server

How can I disable insecure 112 bit cipher suite in a java application server, specifically these ones:…
jgm
  • 1,230
  • 1
  • 19
  • 39
2
votes
1 answer

trying to implement Speck32/64 block Cipher

I am trying to implement Speck 32/64 block Cipher in c# I'm stuck at encryption decryption algorithm. i know that i should split the plain text in to 2 word according to algorithm x,y = plaintext words --------------------------- key expansion…
2
votes
1 answer

Discrepancy between RSA implementations

I'm not a crypto-guy so I know close-to-zero about these things. I must interoperate with a system using RSA cryptography. When using their keys, I'm running into the problem of getting different ciphers for the same input/key. The library is…
Délisson Junio
  • 1,296
  • 4
  • 21
  • 43
1
vote
2 answers

Need help porting XTEA C++ code to PHP

I have some problem convert C++ code to PHP. The purpose is I need to communicate my application (build with C++) with web server (PHP ) using XTEA cipher to encrypt/decrypt the requested packet via XMLRPC. The original code I taken from some…
REFNTiE
  • 21
  • 2
1
vote
0 answers

about block XTEA in C code

i want to send/receive encryption data with differnet endian systems it is possible? i heard that that is possible to same endian systems xxtea code is block xtea in internet... #define MXA (((z>>5^y<<2) + (y>>3^z<<4)) ^ ((sum^y) +…
Autocom
  • 11
  • 1
1 2
3
9 10