1*d905fc10Sjsg.\" $OpenBSD: keynote.1,v 1.38 2022/02/18 10:24:32 jsg Exp $ 27bff6831Sangelos.\" 37bff6831Sangelos.\" The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu) 47bff6831Sangelos.\" 57bff6831Sangelos.\" This code was written by Angelos D. Keromytis in Philadelphia, PA, USA, 67bff6831Sangelos.\" in April-May 1998 77bff6831Sangelos.\" 87bff6831Sangelos.\" Copyright (C) 1998, 1999 by Angelos D. Keromytis. 97bff6831Sangelos.\" 105e4ac158Sderaadt.\" Permission to use, copy, and modify this software with or without fee 117bff6831Sangelos.\" is hereby granted, provided that this entire notice is included in 127bff6831Sangelos.\" all copies of any software which is or includes a copy or 137bff6831Sangelos.\" modification of this software. 147bff6831Sangelos.\" You may use this code under the GNU public license if you so wish. Please 157bff6831Sangelos.\" contribute changes back to the author. 167bff6831Sangelos.\" 177bff6831Sangelos.\" THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 187bff6831Sangelos.\" IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO 197bff6831Sangelos.\" REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 207bff6831Sangelos.\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 217bff6831Sangelos.\" PURPOSE. 227bff6831Sangelos.\" 23*d905fc10Sjsg.Dd $Mdocdate: February 18 2022 $ 2477f4dfefSaaron.Dt KEYNOTE 1 257bff6831Sangelos.\" .TH keynote 1 local 267f3168a2Saaron.Os 277bff6831Sangelos.Sh NAME 287bff6831Sangelos.Nm keynote 29a800e5fbSjmc.Nd command line tool for keynote operations 307bff6831Sangelos.Sh SYNOPSIS 31e5e2d3bdSschwarze.Nm keynote 32e5e2d3bdSschwarze.Cm keygen 33df03c035Sangelos.Ar AlgorithmName 34df03c035Sangelos.Ar KeySize 35df03c035Sangelos.Ar PublicKeyFile 36df03c035Sangelos.Ar PrivateKeyFile 37a800e5fbSjmc.Op Ar print-offset 38a800e5fbSjmc.Op Ar print-length 39a800e5fbSjmc.Pp 40e5e2d3bdSschwarze.Nm 41e5e2d3bdSschwarze.Cm sign 42df03c035Sangelos.Op Fl v 43df03c035Sangelos.Ar AlgorithmName 44df03c035Sangelos.Ar AssertionFile 45df03c035Sangelos.Ar PrivateKeyFile 46a800e5fbSjmc.Op Ar print-offset 47a800e5fbSjmc.Op Ar print-length 48a800e5fbSjmc.Pp 49e5e2d3bdSschwarze.Nm 50e5e2d3bdSschwarze.Cm sigver 51a800e5fbSjmc.Op Ar AssertionFile 52a800e5fbSjmc.Pp 53e5e2d3bdSschwarze.Nm 54e5e2d3bdSschwarze.Cm verify 55df03c035Sangelos.Op Fl h 56df03c035Sangelos.Op Fl e Ar file 57df03c035Sangelos.Op Fl k Ar file 58df03c035Sangelos.Op Fl l Ar file 59aac41b79Sjmc.Fl r Ar retlist 60df03c035Sangelos.Op Ar file ... 619186b70cSangelos.Sh DESCRIPTION 629186b70cSangelosFor more details on 639186b70cSangelos.Nm KeyNote , 649186b70cSangelossee RFC 2704. 65df03c035Sangelos.Sh KEY GENERATION 66e5e2d3bdSschwarze.Nm 67e5e2d3bdSschwarze.Cm keygen 68a800e5fbSjmccreates a public/private key of size 69a800e5fbSjmc.Ar KeySize 70a800e5fbSjmc(in bits), for the algorithm specified by 71a800e5fbSjmc.Ar AlgorithmName . 720b5f7278SmpechTypical keysizes are 512, 1024, or 2048 (bits). 730b5f7278SmpechThe minimum key size for DSA keys is 512 (bits). 740b5f7278SmpechSupported 75a800e5fbSjmc.Ar AlgorithmName 76df03c035Sangelosidentifiers are: 770b5f7278Smpech.Pp 78a800e5fbSjmc.Bl -tag -width Ds -offset indent -compact 79a800e5fbSjmc.It dsa-hex: 80a800e5fbSjmc.It dsa-base64: 81a800e5fbSjmc.It rsa-hex: 82a800e5fbSjmc.It rsa-base64: 83df03c035Sangelos.El 84df03c035Sangelos.Pp 850b5f7278SmpechNotice that the trailing colon is required. 860b5f7278SmpechThe resulting public key is stored in file 87a800e5fbSjmc.Ar PublicKeyFile . 88df03c035SangelosSimilarly, the resulting private key is stored in file 89a800e5fbSjmc.Ar PrivateKeyFile . 900b5f7278SmpechEither of the filenames can be specified to be 91a800e5fbSjmc.Sq - , 921ab3d0faSderaadtin which case the corresponding key(s) will be printed to standard output. 93df03c035Sangelos.Pp 94df03c035SangelosThe optional parameters 95a800e5fbSjmc.Ar print-offset 967bff6831Sangelosand 97a800e5fbSjmc.Ar print-length 98f7de5c7bSalexspecify the offset from the beginning of the line where the key 99df03c035Sangeloswill be printed, and the number of characters of the key that will 100df03c035Sangelosbe printed per line. 101a800e5fbSjmc.Ar print-length 102df03c035Sangelosincludes 103a800e5fbSjmc.Ar AlgorithmName 104df03c035Sangelosfor the first line and has to be longer (by at least 2) than 105a800e5fbSjmc.Ar AlgorithmName . 106a800e5fbSjmc.Ar print-length 107df03c035Sangelosalso accounts for the line-continuation character (backslash) at 108f7de5c7bSalexthe end of each line, and the double quotes at the beginning and end 1090b5f7278Smpechof the key encoding. 1100b5f7278SmpechDefault values are 12 and 50 respectively. 111df03c035Sangelos.Sh ASSERTION SIGNING 112e5e2d3bdSschwarze.Nm 113e5e2d3bdSschwarze.Cm sign 114a800e5fbSjmcreads the assertion contained in 115a800e5fbSjmc.Ar AssertionFile 116df03c035Sangelosand generates a signature specified by 117a800e5fbSjmc.Ar AlgorithmName 118df03c035Sangelosusing the private key stored in 119a800e5fbSjmc.Ar PrivateKeyFile . 120df03c035SangelosThe private key is expected to be of the form output by 121e5e2d3bdSschwarze.Nm 122e5e2d3bdSschwarze.Cm keygen . 1230b5f7278SmpechThe private key algorithm and the 124a800e5fbSjmc.Ar AlgorithmName 1250b5f7278Smpechspecified as an argument are expected to match. 1260b5f7278SmpechThere is no requirement for the internal or ASCII encodings to match. 1270b5f7278SmpechValid 128a800e5fbSjmc.Ar AlgorithmName 129df03c035Sangelosidentifiers are: 1300b5f7278Smpech.Pp 131a800e5fbSjmc.Bl -tag -width Ds -offset indent -compact 132a800e5fbSjmc.It sig-dsa-sha1-hex: 133a800e5fbSjmc.It sig-dsa-sha1-base64: 134a800e5fbSjmc.It sig-rsa-sha1-hex: 135a800e5fbSjmc.It sig-rsa-sha1-base64: 136a800e5fbSjmc.It sig-rsa-md5-hex: 137a800e5fbSjmc.It sig-rsa-md5-base64: 138a800e5fbSjmc.It sig-x509-sha1-hex: 139a800e5fbSjmc.It sig-x509-sha1-base64: 140df03c035Sangelos.El 141df03c035Sangelos.Pp 142df03c035SangelosNotice that the trailing colon is required. 1431ab3d0faSderaadtThe resulting signature is printed to standard output. 1440b5f7278SmpechThis can then be added (via cut-and-paste or some script) at the end of the 145df03c035Sangelosassertion, in the 146a800e5fbSjmc.Ar Signature 147df03c035Sangelosfield. 148df03c035Sangelos.Pp 149df03c035SangelosThe public key corresponding to the private key in 150a800e5fbSjmc.Ar PrivateKeyFile 151df03c035Sangelosis expected to already be included in the 152a800e5fbSjmc.Ar Authorizer 153df03c035Sangelosfield of the assertion, either directly or indirectly (i.e., through 154df03c035Sangelosuse of a 155a800e5fbSjmc.Ar Local-Constants 156ee997aeaSmpechattribute). 157ee997aeaSmpechFurthermore, the assertion must have a 158a800e5fbSjmc.Ar Signature 159df03c035Sangelosfield (even if it is empty), as the signature is computed on 160df03c035Sangeloseverything between the 161a800e5fbSjmc.Ar KeyNote-Version 162df03c035Sangelosand 163a800e5fbSjmc.Ar Signature 164df03c035Sangeloskeywords (inclusive), and the 165a800e5fbSjmc.Ar AlgorithmName 166df03c035Sangelosstring. 167df03c035Sangelos.Pp 168df03c035SangelosIf the 169df03c035Sangelos.Fl v 1700b5f7278Smpechflag is provided, 171e5e2d3bdSschwarze.Nm 172e5e2d3bdSschwarze.Cm sign 1730b5f7278Smpechwill also verify the newly-created signature using the 174a800e5fbSjmc.Ar Authorizer 175df03c035Sangelosfield key. 1769186b70cSangelos.Pp 177a1d1ca57SangelosThe optional parameters 178a800e5fbSjmc.Ar print-offset 179a1d1ca57Sangelosand 180a800e5fbSjmc.Ar print-length 181a1d1ca57Sangelosspecify the offset from the beginning of the line where the signature 182a1d1ca57Sangeloswill be printed, and the number of characters of the signature that will 183a1d1ca57Sangelosbe printed per line. 184a800e5fbSjmc.Ar print-length 185a1d1ca57Sangelosincludes 186a800e5fbSjmc.Ar AlgorithmName 187a1d1ca57Sangelosfor the first line and has to be longer (by at least 2) than 188a800e5fbSjmc.Ar AlgorithmName . 189a800e5fbSjmc.Ar print-length 190a1d1ca57Sangelosalso accounts for the line-continuation character (backslash) at 191a1d1ca57Sangelosthe end of each line, and the double quotes at the beginning and end 1920b5f7278Smpechof the signature encoding. 1930b5f7278SmpechDefault values are 12 and 50 respectively. 194df03c035Sangelos.Sh SIGNATURE VERIFICATION 195e5e2d3bdSschwarze.Nm 196e5e2d3bdSschwarze.Cm sigver 1970b5f7278Smpechreads the assertions contained in 198a800e5fbSjmc.Ar AssertionFile 199204e95a6Sangelosand verifies the public-key signatures on all of them. 200df03c035Sangelos.Sh QUERY TOOL 201df03c035SangelosFor each operand that names a 202c4060768Sdavid.Ar file , 203e5e2d3bdSschwarze.Nm 204e5e2d3bdSschwarze.Cm verify 2050b5f7278Smpechreads the file and parses the assertions contained therein (one assertion 2060b5f7278Smpechper file). 207df03c035Sangelos.Pp 208a800e5fbSjmcThe options are as follows: 209a800e5fbSjmc.Bl -tag -width "retlist" 210a800e5fbSjmc.It Fl e Ar file 211a800e5fbSjmcSpecify a file containing environment variables and their values, 212a800e5fbSjmcin the following format: 213c2fc6b7aSjmc.Pp 214c2fc6b7aSjmc.Dl varname = \&"value\&" 215df03c035Sangelos.Pp 216a800e5fbSjmc.Ar varname 217df03c035Sangeloscan begin with any letter (upper or lower case) or number, 218df03c035Sangelosand can contain underscores. 219a800e5fbSjmc.Ar value 220df03c035Sangelosis a quoted string, and can contain any character, and escape 221df03c035Sangelos(backslash) processing is performed, as specified in the KeyNote 2229186b70cSangelosRFC. 223df03c035Sangelos.It Fl h 224df03c035SangelosPrint a usage message and exit. 225df03c035Sangelos.It Fl k Ar file 226df03c035SangelosAdd a key from 227a800e5fbSjmc.Ar file 228df03c035Sangelosin the action authorizers. 229a800e5fbSjmc.It Fl l Ar file 230a800e5fbSjmcSpecify a file containing trusted assertions (no signature 231a800e5fbSjmcverification is performed), and the 232a800e5fbSjmc.Ar Authorizer 233a800e5fbSjmcfield can contain non-key principals. 234a800e5fbSjmcThere should be at least one assertion with the 235a800e5fbSjmc.Ar POLICY 236a800e5fbSjmckeyword in the 237a800e5fbSjmc.Ar Authorizer 238a800e5fbSjmcfield. 239a800e5fbSjmc.It Fl r Ar retlist 240a800e5fbSjmcSpecify a comma-separated list of return values, in 241a800e5fbSjmcincreasing order of compliance from left to right. 242df03c035Sangelos.El 243df03c035Sangelos.Pp 244df03c035SangelosExactly one 245df03c035Sangelos.Fl r 246a800e5fbSjmcand at least one each of the 247df03c035Sangelos.Fl e , 248df03c035Sangelos.Fl l , 249df03c035Sangelosand 250df03c035Sangelos.Fl k 2510b5f7278Smpechflags should be given per invocation. 2520b5f7278SmpechIf no flags are given, 253e5e2d3bdSschwarze.Nm 254e5e2d3bdSschwarze.Cm verify 2550b5f7278Smpechprints the usage message and exits with error code \-1. 256df03c035Sangelos.Pp 257e5e2d3bdSschwarze.Nm 258e5e2d3bdSschwarze.Cm verify 2590b5f7278Smpechexits with code \-1 if there was an error, and 0 on success. 2607bff6831Sangelos.Sh SEE ALSO 2617bff6831Sangelos.Xr keynote 3 , 262f7dfd180Sangelos.Xr keynote 4 , 263f7dfd180Sangelos.Xr keynote 5 2640b5f7278Smpech.Rs 2650b5f7278Smpech.%A M. Blaze 2660b5f7278Smpech.%A J. Feigenbaum 2670b5f7278Smpech.%A J. Lacy 2680b5f7278Smpech.%D 1996 269cc15c4a4Sjmc.%J IEEE Symposium on Security and Privacy 270cc15c4a4Sjmc.%T Decentralized Trust Management 2710b5f7278Smpech.Re 2720b5f7278Smpech.Rs 2730b5f7278Smpech.%A M. Blaze 2740b5f7278Smpech.%A J. Feigenbaum 2750b5f7278Smpech.%A M. Strauss 2760b5f7278Smpech.%D 1998 277cc15c4a4Sjmc.%J Financial Crypto Conference 278cc15c4a4Sjmc.%T Compliance-Checking in the PolicyMaker Trust Management System 279cc15c4a4Sjmc.Re 280cc15c4a4Sjmc.Sh STANDARDS 281cc15c4a4Sjmc.Rs 282cc15c4a4Sjmc.%A M. Blaze 283cc15c4a4Sjmc.%A J. Feigenbaum 284cc15c4a4Sjmc.%A J. Ioannidis 285cc15c4a4Sjmc.%A A. Keromytis 286cc15c4a4Sjmc.%D September 1999 287cc15c4a4Sjmc.%R RFC 2704 288cc15c4a4Sjmc.%T The KeyNote Trust-Management System Version 2 2890b5f7278Smpech.Re 290ea2542f8Smpech.Sh AUTHORS 2917d353dc4Sschwarze.An Angelos D. Keromytis Aq Mt angelos@cs.columbia.edu 2927bff6831Sangelos.Sh WEB PAGE 293*d905fc10Sjsg.Lk https://www1.cs.columbia.edu/~angelos/keynote.html 294