On Fri, Mar 6, 2015 at 6:31 PM, Trent Hampton <[email protected]>
wrote:

> Greetings,
>

Hello Trent,


>
> I created a generic JNI library modeled off the JNI code in the android
> directory.
>

Very cool.


>
> I would like to use the KEY_BASE64 and HMAC_KEY_BASE64 values generated
> and stored in .fwknoprc. However, I get a key length error because the
> enc_key is too long (longer than 32).
>
> I have been digging through the code but am not seeing if I need to do
> something to unencode the BASE64 values. Do I need to process the
> KEY_BASE64 value before I send the encryption key to the rjindal encryption
> function?
>

Yes, you need to base64-decode the keys before sending them through
Rijndael. (Technically, the actual key that Rijndael uses is derived from
the "key/passphrase" in the .fwknoprc file via PBKDF1.) The reason they are
base64 encoded in the .fwknoprc file is to allow random data to be used as
the keys when they are generated via --key-gen.

Thanks,

--Mike



>
> I hope this all makes sense.
>
> Thanks,
>
> Trent
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Fwknop-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fwknop-discuss

Reply via email to