svnno****@sourc*****
svnno****@sourc*****
2017年 6月 26日 (月) 22:19:57 JST
Revision: 6828 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6828 Author: maya Date: 2017-06-26 22:19:57 +0900 (Mon, 26 Jun 2017) Log Message: ----------- 鍵ファイルのフォーマットを追記 ドキュメントがあるわけではないので現状から。 動いているので間違ってはいないと思うが取れる裏がない。 Modified Paths: -------------- trunk/ttssh2/ttxssh/keyfiles.c -------------- next part -------------- Modified: trunk/ttssh2/ttxssh/keyfiles.c =================================================================== --- trunk/ttssh2/ttxssh/keyfiles.c 2017-06-26 12:54:13 UTC (rev 6827) +++ trunk/ttssh2/ttxssh/keyfiles.c 2017-06-26 13:19:57 UTC (rev 6828) @@ -749,6 +749,33 @@ * * mpint x (the private key parameter) * + * for "ecdsa-sha2-nistp256" or + * "ecdsa-sha2-nistp384" or + * "ecdsa-sha2-nistp521", it will be composed of + * + * "Public-Lines: " plus a number N. + * + * string "ecdsa-sha2-[identifier]" ("ecdsa-sha2-nistp256" or + * "ecdsa-sha2-nistp384" or + * "ecdsa-sha2-nistp521") + * string [identifier] ("nistp256" or "nistp384" or "nistp521") + * string Q (EC_POINT) + * + * "Private-Lines: " plus a number N, + * + * mpint n + * + * for "ssh-ed25519", it will be composed of + * + * "Public-Lines: " plus a number N. + * + * string "ssh-ed25519" + * string key + * + * "Private-Lines: " plus a number N, + * + * string key + * * "Private-MAC: " plus a hex, HMAC-SHA-1 of: * * string name of algorithm ("ssh-dss", "ssh-rsa") @@ -1261,6 +1288,7 @@ * * `if-modn{sign{rsa-pkcs1-sha1},encrypt{rsa-pkcs1v2-oaep}}' * `dl-modp{sign{dsa-nist-sha1},dh{plain}}' + * `ec-modp' * * The encryption. The cipher-type string appears to be either * @@ -1282,6 +1310,11 @@ * - mpint q * - mpint y * - mpint x + * + * For a ECDSA key, the payload blob contains: + * - uint32 1 + * - string [identifier] ("nistp256" or "nistp384" or "nistp521") + * - mpint n */ Key *read_SSH2_SECSH_private_key(PTInstVar pvar, FILE * fp,