Generation of keys for encryption | developer.brewmp.com Generation of keys for encryption | developer.brewmp.com

Developer

Generation of keys for encryption

Forums:

Hello
i need to generate keys for encryting a message.I need to know how to do it.I s there any predefined method to do it or i have to write it myself.

Thanks
Debendra

Key generation for asymmetric key ciphers is not supported in BREW. (It would be painfully slow w/o the as of yet unavailable DSP assitance). You have mainly two options:
(1) Have a pre-generated public/private key pair. (Get X509ed, etc... )
(2) Use a client-server model and the have your server generate the public/private keys. Use ISSL to transmit the pair to your handset.
Both have their plusses and minuses...
If you are talking about private key ciphers, look up BLOCK_CIPHER.BID and STREAM_CIPHER.BID for the key requirement based on the cipher you are using.

Key generation for asymmetric key ciphers is not supported in BREW. (It would be painfully slow w/o the as of yet unavailable DSP assitance). You have mainly two options:
(1) Have a pre-generated public/private key pair. (Get X509ed, etc... )
(2) Use a client-server model and the have your server generate the public/private keys. Use ISSL to transmit the pair to your handset.
Both have their plusses and minuses...
If you are talking about private key ciphers, look up BLOCK_CIPHER.BID and STREAM_CIPHER.BID for the key requirement based on the cipher you are using.

Thanx for ur Quick reply
Here I want to use ICIPHER API for encryption ,but the thing is that to set th e key for ICIPHER API I need the pchKey and it's size as the parameters.
int ICIPHER_Init(ICipher* pICipher, const byte* pchKey, int cbKey)
Can I know Where to find and How to get these Parameters for the above method .
Thanx
Debendra

Thanx for ur Quick reply
Here I want to use ICIPHER API for encryption ,but the thing is that to set th e key for ICIPHER API I need the pchKey and it's size as the parameters.
int ICIPHER_Init(ICipher* pICipher, const byte* pchKey, int cbKey)
Can I know Where to find and How to get these Parameters for the above method .
Thanx
Debendra

Thanx for ur Quick reply
Here I want to use ICIPHER API for encryption ,but the thing is that to set th e key for ICIPHER API I need the pchKey and it's size as the parameters.
int ICIPHER_Init(ICipher* pICipher, const byte* pchKey, int cbKey)
Can I know Where to find and How to get these Parameters for the above method .
Thanx
Debendra

Thanx for ur Quick reply
Here I want to use ICIPHER API for encryption ,but the thing is that to set th e key for ICIPHER API I need the pchKey and it's size as the parameters.
int ICIPHER_Init(ICipher* pICipher, const byte* pchKey, int cbKey)
Can I know Where to find and How to get these Parameters for the above method .
Thanx
Debendra

Look up the afore mentioned BID files. They have information on the length of the key required. The key is something of your choosing since ICIPHER only deals with symmetric key encrpytion.

Look up the afore mentioned BID files. They have information on the length of the key required. The key is something of your choosing since ICIPHER only deals with symmetric key encrpytion.