Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390937 - ssh-keygen shows "unknown key type ecdsa" for openssh >=5.8
Summary: ssh-keygen shows "unknown key type ecdsa" for openssh >=5.8
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-18 18:43 UTC by darin hensley
Modified: 2013-01-05 11:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (hate,4.06 KB, text/plain)
2011-11-18 18:44 UTC, darin hensley
Details
more verbose strace output (verbose,16.41 KB, text/plain)
2011-11-18 19:03 UTC, darin hensley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description darin hensley 2011-11-18 18:43:18 UTC
ssh-keygen shows "unknown key type ecdsa" for openssh >=5.8

===========================================================
localhost etc # ssh-keygen -t ecdsa 
unknown key type ecdsa
localhost etc # ssh-keygen -t ecdsa -b 256
unknown key type ecdsa
localhost etc #

=================================================================
ssh-keygen man page shows ecdsa
sshd_config shows #HostKey /etc/ssh/ssh_host_ecdsa_key



Reproducible: Always

Steps to Reproduce:
1.localhost etc # ssh-keygen -t ecdsa -b 256
2.
3.
Actual Results:  
unknown key type ecdsa

Expected Results:  
ecdsa keys to be created

selinux is in permissive mode
Comment 1 darin hensley 2011-11-18 18:44:22 UTC
Created attachment 293005 [details]
emerge --info
Comment 2 darin hensley 2011-11-18 18:47:59 UTC
Here are the openssl and openssh versions:

localhost etc # emerge -pv openssh openssl

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-libs/openssl-1.0.0e  USE="bindist (sse2) zlib -gmp -kerberos -rfc3779 -test" 0 kB
[ebuild   R    ] net-misc/openssh-5.8_p1-r1  USE="X hpn pam (selinux) tcpd -X509 -kerberos -ldap -libedit -skey -static" 0 kB

Total: 2 packages (2 reinstalls), Size of downloads: 0 kB

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

localhost etc #
Comment 3 darin hensley 2011-11-18 18:54:53 UTC
strace:

localhost etc # strace ssh-keygen -t ecdsa 
execve("/usr/bin/ssh-keygen", ["ssh-keygen", "-t", "ecdsa"], [/* 43 vars */]) = 0
brk(0)                                  = 0x7ff137e62460
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff137c2f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=93984, ...}) = 0
mmap(NULL, 93984, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff137c18000
close(3)                                = 0
open("/usr/lib64/libcrypto.so.1.0.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\332\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1748528, ...}) = 0
mmap(NULL, 3858944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff137664000
mprotect(0x7ff1377ee000, 2097152, PROT_NONE) = 0
mmap(0x7ff1379ee000, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x7ff1379ee000
mmap(0x7ff137a0f000, 12800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff137a0f000
close(3)                                = 0
open("/lib64/libdl.so.2", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14320, ...}) = 0
mmap(NULL, 2109600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff137460000
mprotect(0x7ff137462000, 2097152, PROT_NONE) = 0
mmap(0x7ff137662000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ff137662000
close(3)                                = 0
open("/lib64/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3208\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=80008, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff137c17000
mmap(NULL, 2185416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff13724a000
mprotect(0x7ff13725d000, 2093056, PROT_NONE) = 0
mmap(0x7ff13745c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000) = 0x7ff13745c000
mmap(0x7ff13745e000, 6344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff13745e000
close(3)                                = 0
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\\\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=134803, ...}) = 0
mmap(NULL, 2212192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff13702d000
mprotect(0x7ff137044000, 2097152, PROT_NONE) = 0
mmap(0x7ff137244000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7ff137244000
mmap(0x7ff137246000, 12640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff137246000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\356\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1457224, ...}) = 0
mmap(NULL, 3566472, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff136cc6000
mprotect(0x7ff136e23000, 2097152, PROT_NONE) = 0
mmap(0x7ff137023000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15d000) = 0x7ff137023000
mmap(0x7ff137028000, 19336, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff137028000
close(3)                                = 0
open("/lib64/libz.so.1", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340#\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=100304, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff137c16000
mmap(NULL, 2195600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff136aad000
mprotect(0x7ff136ac5000, 2093056, PROT_NONE) = 0
mmap(0x7ff136cc4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7ff136cc4000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff137c15000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff137c14000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff137c13000
arch_prctl(ARCH_SET_FS, 0x7ff137c14700) = 0
mprotect(0x7ff136cc4000, 4096, PROT_READ) = 0
mprotect(0x7ff137023000, 16384, PROT_READ) = 0
mprotect(0x7ff137244000, 4096, PROT_READ) = 0
mprotect(0x7ff13745c000, 4096, PROT_READ) = 0
mprotect(0x7ff137662000, 4096, PROT_READ) = 0
mprotect(0x7ff1379ee000, 98304, PROT_READ) = 0
mprotect(0x7ff137e60000, 4096, PROT_READ) = 0
mprotect(0x7ff137c30000, 4096, PROT_READ) = 0
munmap(0x7ff137c18000, 93984)           = 0
set_tid_address(0x7ff137c149d0)         = 32048
set_robust_list(0x7ff137c149e0, 0x18)   = 0
futex(0x7fff715550dc, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fff715550dc, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7ff137c14700) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7ff137032b40, [], SA_RESTORER|SA_SIGINFO, 0x7ff13703c430}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7ff137032bd0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7ff13703c430}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
open("/dev/null", O_RDWR)               = 3
close(3)                                = 0
brk(0)                                  = 0x7ff137e62460
brk(0x7ff137e83460)                     = 0x7ff137e83460
brk(0x7ff137e84000)                     = 0x7ff137e84000
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 3
fstat(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
poll([{fd=3, events=POLLIN}], 1, 10)    = 1 ([{fd=3, revents=POLLIN}])
read(3, "\324WI\17A\227\253\307|W\225S\262\34\207\224\355\312\253BU?R\257A\2325\322\1\21`\214", 32) = 32
close(3)                                = 0
getuid()                                = 0
time(NULL)                              = 1321645889
getuid()                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff137c2e000
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 4096) = 508
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7ff137c2e000, 4096)            = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=93984, ...}) = 0
mmap(NULL, 93984, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff137c18000
close(3)                                = 0
open("/lib64/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \23\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=31064, ...}) = 0
mmap(NULL, 2126800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff1368a5000
mprotect(0x7ff1368ac000, 2093056, PROT_NONE) = 0
mmap(0x7ff136aab000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ff136aab000
close(3)                                = 0
open("/lib64/libnsl.so.1", O_RDONLY)    = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320@\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=87968, ...}) = 0
mmap(NULL, 2193296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff13668d000
mprotect(0x7ff1366a2000, 2093056, PROT_NONE) = 0
mmap(0x7ff1368a1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7ff1368a1000
mmap(0x7ff1368a3000, 6032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff1368a3000
close(3)                                = 0
mprotect(0x7ff1368a1000, 4096, PROT_READ) = 0
mprotect(0x7ff136aab000, 4096, PROT_READ) = 0
munmap(0x7ff137c18000, 93984)           = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=93984, ...}) = 0
mmap(NULL, 93984, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff137c18000
close(3)                                = 0
open("/lib64/libnss_nis.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200 \0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=42936, ...}) = 0
mmap(NULL, 2138968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff136482000
mprotect(0x7ff13648c000, 2093056, PROT_NONE) = 0
mmap(0x7ff13668b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7ff13668b000
close(3)                                = 0
open("/lib64/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=51104, ...}) = 0
mmap(NULL, 2147408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff136275000
mprotect(0x7ff136280000, 2097152, PROT_NONE) = 0
mmap(0x7ff136480000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7ff136480000
close(3)                                = 0
mprotect(0x7ff136480000, 4096, PROT_READ) = 0
mprotect(0x7ff13668b000, 4096, PROT_READ) = 0
munmap(0x7ff137c18000, 93984)           = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
lseek(3, 0, SEEK_CUR)                   = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=1022, ...}) = 0
mmap(NULL, 1022, PROT_READ, MAP_SHARED, 3, 0) = 0x7ff137c2e000
lseek(3, 1022, SEEK_SET)                = 1022
munmap(0x7ff137c2e000, 1022)            = 0
close(3)                                = 0
uname({sys="Linux", node="localhost", ...}) = 0
write(2, "unknown key type ecdsa\n", 23unknown key type ecdsa
) = 23
exit_group(1)                           = ?
localhost etc #
Comment 4 darin hensley 2011-11-18 19:03:08 UTC
Created attachment 293013 [details]
more verbose strace output

more verbose strace output
Comment 5 darin hensley 2011-11-19 00:04:24 UTC
thanks to vinky_ from #gentoo-hardened. ECC has some patents, so it is disabled by bindist. I had to disable bindist in openssl to get ECC to compile into the code.
Comment 6 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2011-11-19 02:06:07 UTC
This is more of a can't than a won't since bindist versions have to be patent free ;)
Comment 7 Mark (voidzero) 2013-01-05 11:51:12 UTC
I'm not so sure about this. I'm not a lawyer nor can I call myself even a crypto novice but I did learn one or two things recently.

RSA Labs describes that not the algorithm, but only certain implementations are c.q. can be patented.

https://www.rsa.com/rsalabs/node.asp?id=2325

From the following comment it seems that OpenSSL has implemented a patent free ECC algorithm:

"The ECC implementation in OpenSSL has been contributed by Sun (now Oracle and was, supposedly, written that way precisely to avoid any patented method."

Full discussion at the following page:

http://security.stackexchange.com/questions/3519/can-ecc-be-used-without-infringing-on-patents

So I humbly request reconsideration so that ECC can be added by default. ECC has many benefits: computationally it is much less costly but also more efficient. The venerable Steve Gibson gives a great explanation in Security Now:

https://www.youtube.com/watch?v=zNrMTANHiHs