Dear sir,
thanks a lot for your suggestion.it was of great help.
but i further want some favour fron you regarding the same.
that muscletool program, docrypt function, is in one line showing it is not using any padding
cryptInit.cipherMode = MSC_MODE_RSA_NOPAD;
and then in next line it is using a function :
padData(inCryptData, inDataSize, keySize);
i am not able to find this paddata function so that i can modify the program according to my requirement.
is it using some padding or mode or not.i just want to use RSA with no padding.
Moreover i want to remove bintohex format in my output and want bintobytes format
as output i.e. output in bytes format.
Kindly tell me what changes i need to do in my program to suit these two requirements.
i would not like to alter the process ,as it given in the program i.e.encryption using privatekey.
i will be very thankful if you can help me with these problems.
thanks and regards
vigya
-- Original Message --
From: "Peter Williams" <[EMAIL PROTECTED]>
To: "MUSCLE" <[email protected]>
Date: Sat, 12 Mar 2005 08:34:33 -0800
Subject: Re: [Muscle] Encryption /Signature in muscle tool
A long time ago, I believe I altered muscleTool's void doCrypt() method.
>You can do the same to invoke encrypt/decrypt cipher modes across the
>interface. See below.
>
>In my modifications, I altered the sign feature, to invoke the applet's use
>of PKCS#1 padding, rather than use "block encryption using the private key
>transform." I don't recall if the removal of the hex2bin formatter on the
>in/out stream was me, or was there in the CVS source. The formatter
>hows - in any case - where you can apply additional processing, before and
>after the RSA decryption (using private key) operation.
>
>If you use the existing "sign" function in its original muscle form (with
>RSA_RAW), and you first format your plaintext in an OAEP wrapper, you have
>block encipherment exploiting randomness properties of the wrapping oracle.
>Remember to keep the public key a secret, in such a mechanism.
>
>This is the converse of the process specified in the documented cited
>below. Using RSA decryption as an enciphering function over an RSA_RAW
>block (using the private-key transform) may subject you to professional
>censure, note; so, be warned! But you get the idea. Go alter the code - to
>suit project requirements.
>
>citation:
>ftp://ftp.rsasecurity.com/pub/rsalabs/rsa_algorithm/rsa-oaep_spec.pdf
>
>
>
>" if(strcmp(arg3, "sign") ==0 )
>  cipherDir = (MSCUChar8)1;
> else if(strcmp(arg3, "verify") ==0 )
>  cipherDir = (MSCUChar8)2;
> else {
>  printf("ERR: Invalid Use: crypt [keynum] [sign/verify]\n");
>  return;
> }
> //inDataSize = hexToBin(hexString, inCryptData);
>
> rv = MSCGetKeyAttributes( pConnection, (MSCUChar8)keyNum, &keyInfo );
> CHECK_ERR(rv != MSC_SUCCESS, "GetKeyAttributes Failed !");
>
> keySize = keyInfo.keySize / 8;
>
> cryptInit.keyNum = (MSCUChar8)keyNum;
>#if 0
> cryptInit.cipherMode = MSC_MODE_RSA_NOPAD;
>#else
> cryptInit.cipherMode = MSC_MODE_RSA_PAD_PKCS1
>;
>#endif
> cryptInit.cipherDirection = cipherDir;
> cryptInit.optParams = 0;
> cryptInit.optParamsSize = 0;
>
> //padData(inCryptData, inDataSize, keySize);
> //inDataSize = outDataSize = keySize;
>
> //binToHex(inCryptData, inDataSize, outCryptData);
>
> rv = MSCComputeCrypt( pConnection, &cryptInit,
>  inCryptData, inDataSize,
>  outCryptData, &outDataSize);
>
>
>----- Original Message -----
>From: "vsingh" <[EMAIL PROTECTED]>
>To: <[email protected]>
>Sent: Saturday, March 12, 2005 12:39 AM
>Subject: [Muscle] Encryption /Signature in muscle tool
>
>
>> Hi All!
>> can any one please help me with this problem:
>> i am using muscle tool provided with muscleframework 1.1.3.
>> there is an option of performimg a "Crypt" function in muscle tool.can
>> anyone tell me is that a function for "Encryption" or "Signature" using
>> Private key.
>> one more thing:Which "mode" and "padding" is being used by RSA in this
>> case for performing this Crypt function.
>> please help me if anyone is aware of it.
>> thanks
>> vigya
>>
>> _______________________________________________
>> Muscle mailing list
>> [email protected]
>> http://lists.drizzle.com/mailman/listinfo/muscle
>>
>_______________________________________________
>Muscle mailing list
>[email protected]
>http://lists.drizzle.com/mailman/listinfo/muscle
>


--------------------------------------------
Email in Indian languages.
This mail has been sent to you from http://webmail.idrbt.ac.in

<

DISCLAIMER:
This message is intended solely for the individual or entity to which it is addressed.This communication may contain information that is proprietary, privileged or confidential and otherwise legally exempt from disclosure. If you are not the named addressee,or have been inadvertently referenced in the address line, you are not authorized to read, print, retain, copy or disseminate this message or any part of it.If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.Visit us at http://www.idrbt.ac.in./BODY>

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to