From: Daniel Golle Date: Fri, 8 Jun 2018 00:50:00 +0000 (+0200) Subject: README.md... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8e91520771a7e0c86690e14443672a68818101e2;p=project%2Fucert.git README.md... Signed-off-by: Daniel Golle This work was sponsored by WIO (wiowireless.com) --- diff --git a/README.md b/README.md index e0efd68..761eaf5 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,18 @@ ucert is a signature-chaining wrapper around usign using blob and blobmsg. It's meant to be used for OpenWrt routers and uses libubox for most things, to allow dumping certificates in JSON format libjson-c and libblobmsg-json are used as well. ## a few words about security -ucert inherits all its cryptographic properties from the underlying usign implementation which as such wasn't meant to be used in such a way. +ucert inherits all its cryptographic properties from the underlying **usign** implementation which as such may not have been meant to be used in such a way. To maintain a high cryptographic standard, it is likely that further optimization of the signed payload format (reduce known-plaintext by normalization, add salts in case usign doesn't, ...) has to be carried out. +The parsers are inherited from libubox, and despite the extremely good reputation of the blob it must not be unmenetioned that libubox also most likely wasn't intended to be used for cryptographic purposes. +Yet it does provide the mechanisms needed (data-encapsulation, parsing, ...) in a way much more straight forward than any ASN.1 implementation ever could at a fraction of the source footprint. + + +## handling revokation +ucert generates a revoker certificate for each issued authorization certificate. Unlike X.509, the revokation mechanism is rather flat: It only allows keys present in pubkeydir (ie. /etc/opkg/keys) to revoke any other key. There are no means for delegation of revokation or anything the like. + +When ucert is called with the `-R` command to process a chain of revokers, each of them is verified against the pubkeydir. Once validated, a dead symlink for the revoked key is created in /etc/opkg/keys. + +Currently the signatures of the to-be-revoked keys are signed one-by-one -- if that turns out to be a scalability concern, revokation could easily be changed to operate with lists of to-be-revoked pubkeys. The advatage of the current implementation is that revokers can simple be appended and hence who ever takes care of the update or provisioning mechanism serving those revokers doesn't need to know anything about the internal affairs of ucert. They can simply use `cat`. ## usage ```shell @@ -44,6 +54,10 @@ usign -S -m message.bin -s seckey -x message.bin.sig cp newcert message.bin.ucrt ucert -A -c message.bin.ucrt -x message.bin.sig -# on client +# on (OpenWrt) client +# get revokers periodically eg. via http and process them: +ucert -R -P /etc/opkg/keys -c all-revokers.ucrt +# verify message with ucert against pubkeys in /etc/opkg/keys ucert -V -P /etc/opkg/keys -m message.bin -c message.bin.ucrt && echo message.bin verified successfully ``` +