Add license.
Fix byte ordering of arguments to public functions so that public/private keys visible to the user conform to the standard representation.