Discussion:
[OATH-Toolkit-help] Any chance to support Portable Symmetric Key Container (PSKC) seed format
Jean-Michel Pouré - GOOZE
2012-09-19 09:59:31 UTC
Permalink
Dear all,

Just a quick note that we release a web page with sample seed files for
Feitian c100 / c200 hardware tokens:
http://www.gooze.eu/howto/feitian-oath-tokens-integration-howto/reading-feitian-oath-seed-codes

Along with TXT and PDF format, we provide a PSKC sample file:
http://download.gooze.eu/otp/seeds/20120919-test001-4282.xml

Is there any chance to see this format supported by OATH toolkit?

The format is open and described here:
http://tools.ietf.org/id/draft-hoyer-keyprov-pskc-algorithm-profiles-01.txt

This is just a reminded for interested people willing to contribute to
OATH toolkit. Adding PSKC would really rock ...

Kind regards,
Jean-Michel POURE
CEO
--
GOOZE - http://www.gooze.eu
High quality cryptographic tools
for GNU/Linux, Mac OS X and Windows
including the FEITIAN PKI card
POURE SASU - 17 rue Saint Jacques - 95160 Montmorency - France
Tel : +33 (0)9 72 13 53 90 - Mobile : +33 (0)6 51 99 37 90
Registry: FR 527 672 448 00018 - VAT: FR54527672448
ID PGP/GPG: 084F2584
Simon Josefsson
2012-09-19 10:05:23 UTC
Permalink
Post by Jean-Michel Pouré - GOOZE
Dear all,
Just a quick note that we release a web page with sample seed files for
http://www.gooze.eu/howto/feitian-oath-tokens-integration-howto/reading-feitian-oath-seed-codes
http://download.gooze.eu/otp/seeds/20120919-test001-4282.xml
Is there any chance to see this format supported by OATH toolkit?
Hi. I'd very much like to see support for PSKC. It has been on the
roadmap since day one, but nothing concrete has happened yet...

If someone wants to help work on this, that would be great. I have it
on my todo list, and may be inspired to start work on it sooner now, but
there is plenty of other things to work on and some of it are paid...

/Simon
Post by Jean-Michel Pouré - GOOZE
http://tools.ietf.org/id/draft-hoyer-keyprov-pskc-algorithm-profiles-01.txt
This is just a reminded for interested people willing to contribute to
OATH toolkit. Adding PSKC would really rock ...
Kind regards,
Jean-Michel POURE
CEO
Simon Josefsson
2012-09-21 12:30:04 UTC
Permalink
I've been thinking about PSKC and trying to figure out what it would
mean to support it in OATH Toolkit. I can imagine the following:

* Library functions to read and parse PSKC files and iterate through the
data and extract the fields.

* Tool to parse PSKC files and print the content in a human friendly
way.

* Tool to protect encrypt/decrypt PSKC files, according to section 6 in
RFC 6030. There are several ways here, and it isn't clear what would
be best to do.

What functionality is interesting?

/Simon
Jean-Michel Pouré - GOOZE
2012-09-24 07:56:57 UTC
Permalink
Dear Simon,
Post by Simon Josefsson
I've been thinking about PSKC and trying to figure out what it would
Thanks for looking at it.
Post by Simon Josefsson
* Library functions to read and parse PSKC files and iterate through the
data and extract the fields.
* Tool to parse PSKC files and print the content in a human friendly
way.
* Tool to protect encrypt/decrypt PSKC files, according to section 6 in
RFC 6030. There are several ways here, and it isn't clear what would
be best to do.
What functionality is interesting?
IMHO PSKC is useful for key provisioning (2nd option).

A small tool in the tradition of Unix would be nice to compute a PSKC
file a display/manipulate a seed. Then we can use a simple batch script
to manipulate /etc/users.oath.

Of course, another approach would be that /etc/users.oath references the
PSKC file. It would allow to store the seed securely on server.

But ... IMHO most vendors are using Radius protocol to store seeds
securely. So modifying /etc/users.oath may be a lot of work when
FreeRadius is able to do the work in conjunction with LDAP.

A customer recently explained that he was using FreeRadius with a custom
python script to manage OATH authentication. But I believe this is a
custom work and is not available to the public. oathtool could do the
trick also and I am trying to understand how to use it with FreeRadius.

For all these reasons, I believe a small utility would do the trick for
provisioning. This can be a first approach.

The ultimate solution would be an ePass2003 token on server, with
Freeradius and LDAP. The ePass2003 can be found here:
http://www.gooze.eu/epass-2003

On FreeRadius startup, the user would need to enter a PIN code to unlock
the seed encryption key in memory. This would really enhance the
security.

So the roadmap could be:
1) Provide a small PSKC utility.
2) Work on a FreeRadius HOWTO with customs scripts to integrate
OATHtoolkit with FreeRadius, with little glue as possible.
3) Work on a more advanced version secured by a crypto stick like the
ePass2003. But I believe that even that can be managed by a custom
script in the Unix tradition.

Kind regards,
Jean-Michel POURE
--
GOOZE - http://www.gooze.eu
High quality cryptographic tools
for GNU/Linux, Mac OS X and Windows
including the FEITIAN PKI card
POURE SASU - 17 rue Saint Jacques - 95160 Montmorency - France
Tel : +33 (0)9 72 13 53 90 - Mobile : +33 (0)6 51 99 37 90
Registry: FR 527 672 448 00018 - VAT: FR54527672448
ID PGP/GPG: 084F2584
Simon Josefsson
2012-09-24 14:25:51 UTC
Permalink
Post by Jean-Michel Pouré - GOOZE
Post by Simon Josefsson
* Library functions to read and parse PSKC files and iterate through the
data and extract the fields.
* Tool to parse PSKC files and print the content in a human friendly
way.
* Tool to protect encrypt/decrypt PSKC files, according to section 6 in
RFC 6030. There are several ways here, and it isn't clear what would
be best to do.
What functionality is interesting?
IMHO PSKC is useful for key provisioning (2nd option).
A small tool in the tradition of Unix would be nice to compute a PSKC
file a display/manipulate a seed.
I have started implementing a command line tool to interact with PSKC
data. It uses a new library, libpskc, to do the real work. The
features of the tool (and thus the library) that make sense initially
appears to be:

* Parse data and validate it against PSKC XML schema.

* Create PSKC data based on input parameters.

* Parse PSKC data, printing certain fields requested by user.

* Convert PSKC data to some simpler format.

I think the above should be implemented before thinking about next
steps. I have created a branch in git for this, see:

http://git.savannah.gnu.org/cgit/oath-toolkit.git/log/?h=features/pskc

Expect more within the next few days...

A next step would to support PSKC data protection, but I'd like to
implement the stuff above first and then re-read the relevant portion of
the RFC to evaluate what makes sense to do.

/Simon
Simon Josefsson
2012-09-26 09:54:43 UTC
Permalink
Post by Simon Josefsson
I have started implementing a command line tool to interact with PSKC
data. It uses a new library, libpskc, to do the real work. The
features of the tool (and thus the library) that make sense initially
* Parse data and validate it against PSKC XML schema.
* Create PSKC data based on input parameters.
* Parse PSKC data, printing certain fields requested by user.
* Convert PSKC data to some simpler format.
I think the above should be implemented before thinking about next
http://git.savannah.gnu.org/cgit/oath-toolkit.git/log/?h=features/pskc
Expect more within the next few days...
A quick update on this. The code on that branch is now able to do some
simple things. I have realized some issues and will being to refactor
the code a bit, but if you want a working tool use
5fb9e4ad19d05b43bcda61b055467f05496531b6.

Validation against the XML schema:

***@latte:~$ wget --quiet http://download.gooze.eu/otp/seeds/20120919-test001-4282.xml
***@latte:~$ ~/src/oath-toolkit/pskctool/pskctool -e 20120919-test001-4282.xml
OK
***@latte:~$

Print information about PSKC blob extracted from RFC 6030:

***@latte:~$ cat pskc-basic.xml
<?xml version="1.0" encoding="UTF-8"?>
<KeyContainer Version="1.0"
Id="exampleID1"
xmlns="urn:ietf:params:xml:ns:keyprov:pskc">
<KeyPackage>
<Key Id="12345678"
Algorithm="urn:ietf:params:xml:ns:keyprov:pskc:hotp">
<Issuer>Issuer-A</Issuer>
<Data>
<Secret>
<PlainValue>MTIzNA==
</PlainValue>
</Secret>
</Data>
</Key>
</KeyPackage>
</KeyContainer>
***@latte:~$ ~/src/oath-toolkit/pskctool/pskctool -c < pskc-basic.xml
Portable Symmetric Key Container (PSKC):
Version: 1.0
Id: exampleID1
KeyPackage 1:
Key:
Id: 12345678
Algorithm: urn:ietf:params:xml:ns:keyprov:pskc:hotp
Issuer: Issuer-A
Data:
Secret:
PlainValue: MTIzNA==

***@latte:~$

Another blob from RFC 6030:

***@latte:~$ cat pskc-supp.xml
<?xml version="1.0" encoding="UTF-8"?>
<KeyContainer Version="1.0"
Id="exampleID1"
xmlns="urn:ietf:params:xml:ns:keyprov:pskc">
<KeyPackage>
<DeviceInfo>
<Manufacturer>Manufacturer</Manufacturer>
<SerialNo>987654321</SerialNo>
<UserId>DC=example-bank,DC=net</UserId>
</DeviceInfo>
<CryptoModuleInfo>
<Id>CM_ID_001</Id>
</CryptoModuleInfo>
<Key Id="12345678"
Algorithm="urn:ietf:params:xml:ns:keyprov:pskc:hotp">
<Issuer>Issuer</Issuer>
<AlgorithmParameters>
<ResponseFormat Length="8" Encoding="DECIMAL"/>
</AlgorithmParameters>
<Data>
<Secret>
<PlainValue>MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=
</PlainValue>
</Secret>
<Counter>
<PlainValue>0</PlainValue>
</Counter>
</Data>
<UserId>UID=jsmith,DC=example-bank,DC=net</UserId>
</Key>
</KeyPackage>
</KeyContainer>
***@latte:~$ ~/src/oath-toolkit/pskctool/pskctool -c < pskc-supp.xml
Portable Symmetric Key Container (PSKC):
Version: 1.0
Id: exampleID1
KeyPackage 1:
DeviceInfo:
Manufacturer: Manufacturer
SerialNo: 987654321
UserId: DC=example-bank,DC=net
warning: unsupported KeyPackage member 'CryptoModuleInfo'
Key:
Id: 12345678
Algorithm: urn:ietf:params:xml:ns:keyprov:pskc:hotp
Issuer: Issuer
AlgorithmParameters:
ResponseFormat:
Length: 8
Encoding: DECIMAL
Data:
Secret:
PlainValue: MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=

Counter:
PlainValue: 0
UserId: UID=jsmith,DC=example-bank,DC=net
***@latte:~$

/Simon
Simon Josefsson
2012-09-27 07:30:05 UTC
Permalink
The utility pskctool can now parse the PSKC examples from figure 2, 3,
4, 5 and 10 in RFC 6030. This is with git checkout
efb0102c15b1f3a0baab23af7bbae22e17877064. There is still some mileage
to go, but I think we'll have a OATH Toolkit with PSKC support released
within a few weeks.

I'm now collecting PSKC samples that I can include for self-testing
purposes. If anyone is sitting on PSKC files, please send them to me!

/Simon

Loading...