turiya / keyczar

Automatically exported from code.google.com/p/keyczar
0 stars 0 forks source link

make "usekey" available and consistent in all keyczartool implementations #116

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The usekey command would make it much easier to produce equivalent keysets and 
ciphertext across various implementations of keyczar.

I wrote three scripts to produce test data on Java, Python and C#
https://gist.github.com/4519944

Because Java and C# had use key commands, and python just didn't have it 
exposed, C++ doesn't have it at all.

modified python version here
http://code.google.com/r/jtuley-keyczar-python-usekey-exposed/source/checkout

Most of the scripts are identical, in fact it was only the usekey lines, that 
needed to be different.

I think an addition that would help create more integration tests would be to 
have a --format flag that could take:

crypt
sign
sign-timeout
sign-unversioned
sign-attached
crypt-session
crypt-signedsession 

to produce the various wire formats.

crypt-session
would likely need a destination2

and

crypt-signedsession 
Would require a location2, crypter2, as well to handle the fact that two 
keysets are used.

Original issue reported on code.google.com by jtu...@gmail.com on 19 Jan 2013 at 12:31

GoogleCodeExporter commented 9 years ago
Updated python to output all wire formats in 
jtuley-keyczar-python-usekey-exposed

Original comment by jtu...@gmail.com on 23 Jan 2013 at 1:29

GoogleCodeExporter commented 9 years ago
Examples of usage for "usekey" that will produce all wire formats, if 
implemented for C++/java along with issue 115, then test data production could 
be produced and changed from a single borne shell script.

$KEYPROG usekey --location="${TESTDATA}/aes" 
--destination="${TESTDATA}/aes/1.out" --format=crypt "This is some test data" 

$KEYPROG usekey --location="${TESTDATA}/hmac" 
--destination="${TESTDATA}/hmac/2.out" --format=sign "This is some test data"

$KEYPROG usekey --location="${TESTDATA}/hmac" 
--destination="${TESTDATA}/hmac/2.timeout" --format=sign-timeout "This is some 
test data" 2012-12-21T11:11:00Z

$KEYPROG usekey --location="${TESTDATA}/hmac" 
--destination="${TESTDATA}/hmac/2.unversioned" --format=sign-unversioned "This 
is some test data"

$KEYPROG usekey --location="${TESTDATA}/hmac" 
--destination="${TESTDATA}/hmac/2.attached" --format=sign-attached "This is 
some test data"

$KEYPROG usekey --location="${TESTDATA}/hmac" 
--destination="${TESTDATA}/hmac/2.secret.attached" --format=sign-attached "This 
is some test data" "secret"

$KEYPROG usekey --location="${TESTDATA}/rsa.public" 
--destination="${TESTDATA}/rsa/2.session.material" 
--destination2="${TESTDATA}/rsa/2.session.ciphertext" --format=crypt-session 
"This is some test data"

$KEYPROG usekey --location="${TESTDATA}/rsa.public" 
--location2="${TESTDATA}/dsa" 
--destination="${TESTDATA}/rsa/2.signedsession.material" 
--destination2="${TESTDATA}/rsa/2.signedsession.ciphertext" 
--format=crypt-signedsession "This is some test data"

Original comment by jtu...@gmail.com on 24 Jan 2013 at 3:24

GoogleCodeExporter commented 9 years ago
Re-patched feature in to it's own commit

http://code.google.com/r/jtuley-keyczar-python-usekey-exposed/source/detail?r=f9
e408a106a307fb4a0cf87f02a34c933cf157b5

Original comment by jtu...@gmail.com on 28 Jan 2013 at 11:43

GoogleCodeExporter commented 9 years ago
added matching 'usekey' command flags, built upon clone submitted for Issue 104

http://code.google.com/r/jtuley-java-usekey-interop/source/detail?r=81dd34095bf8
43a5d1a4a5ec4d49bd8107554b06

Original comment by jtu...@gmail.com on 11 Feb 2013 at 12:46

GoogleCodeExporter commented 9 years ago

Original comment by jtu...@gmail.com on 2 Mar 2013 at 9:01

GoogleCodeExporter commented 9 years ago

Original comment by jtu...@gmail.com on 15 Mar 2013 at 6:23