oath-toolkit-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OATH-Toolkit-help] building PSKC data: how should the interface be?


From: Simon Josefsson
Subject: [OATH-Toolkit-help] building PSKC data: how should the interface be?
Date: Thu, 11 Oct 2012 17:15:49 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> My priority is to work on functions to set PSKC fields, to enable
> building an interface in pskctool to generate PSKC data, and then look
> at the encryption part of PSKC.

The design of the library API is pretty straightforward.  However how
should the command line tool work?  Does providing values on the command
line like this make sense?

pskctool --build --container "version=1.0,id=FOOBAR" \
  --keypackage 
"key-id=1234,key-algorithm=urn:ietf:params:xml:ns:keyprov:pskc:hotp,device-manufacturer=SomeManufacturer,key-b64secret=MTIzNA=="

You could have one --keypackage parameter per keypackage structure.

Or should it read from standard input some format?  For example:

pskctool --build --container-version 1.0 --container-id FOOBAR \
  --keypackage-format "key-id,key-algorithm,device-manufacturer,key-b64secret"

which would then read line-based data like this:

1234,urn:ietf:params:xml:ns:keyprov:pskc:hotp,SomeManufacturer,MTIzNA==

That is better since secret keys are not provided on the command line.
It could support a "default" simple input format so one could do:

pskctool --build <EOF
container-version=1.0
container-id=FOOBAR
key-id=1234
key-algorithm=urn:ietf:params:xml:ns:keyprov:pskc:hotp
device-manufacturer=SomeManufacturer
key-b64secret=MTIzNA==
EOF

However some mechanism is needed to separate different keypackages.
Maybe like this:

[container]
version=1.0
id=FOOBAR
[keypackage]
key-id=1234
key-algorithm=urn:ietf:params:xml:ns:keyprov:pskc:hotp
device-manufacturer=SomeManufacturer
key-b64secret=MTIzNA==
[keypackage]
key-id=5678
key-algorithm=urn:ietf:params:xml:ns:keyprov:pskc:hotp
device-manufacturer=SomeOtherManufacturer
key-b64secret=AMAMAA==

Any other ideas?

/Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]