i am implementing blowfish using jce (java cryptography extension )
im generating the key using
KeyGenerator keyGenerator = KeyGenerator.ge tInstance("Blow fish");
keyGenerator.in it(128);
SecretKey key = keyGenerator.ge nerateKey();
now how do i retrieve the key so as to send it to another party or display it.. i have tried something and this is wat im getting : -
System.out.prin tln("the...
User Profile
Collapse
-
retrieving the key in jce(java cyptography extension)
-
Left Circular Shifting a size-16 byte-array by 25
//the code is as follows
package test;
//import java.lang.Integ er;
/**
*
* @author Niket
*/
public class Main {
public static void main(String[] args) {
int set=0;
byte one = 1;
String s = new String();
s = "ponmlkjihgfedc ba";
byte b[] = s.getBytes();
for(int i=0; i<b.length; i++)... -
i am implementing idea encryption algo
i have to perform a left circular shift by 25 on the byte array i.e byte_array[16] which is nothin but my key..
then take some elements from the byte array to form the subkeys and then again perform circular left shift by 25 on the entire byte array to generate subkeys for the next rounds.. i know how to do a circular shift
but the problem is byte_array[16] has altogether 128 bits.. nd i... -
i have a byte array say byte_array[16]
i want to perform a circular shift on the byte arrayLeave a comment:
-
how do i store byte array of16 elements as one no.
i have a byte array having 16 elements i.e 128 bits.. i want to do bit manipulations on this 128 bit byte array
how can i store this 128 bit as one no.so i can do bit manipulations -
hii
thanks for the reply
but the problem i am facing now is that it is giving me number format exception for string s
i guess the string becomes too large to be stored in a long no.
what i want is
a long no. X ( 64 bit )
divide to two 32 bits xl and xr
and then merge xl and xr as 64 bit X againLeave a comment:
-
merge two long numbers into one long number
i am implementing blowfish algorithm..
i have a long number or a 64 bit no. say X
i have to divide this 64 bit block into two 32 bit blocks say xl and xr.
after doing some calculations i have to convert these two 32 bit blocks into 64 bit block again..
so how do i do this
pls help..
No activity results to display
Show More
Leave a comment: