public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* OpenSSH FIPS 140-2
@ 2019-06-24 18:50 Pinzone, Gerard
  2019-06-25  3:06 ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: Pinzone, Gerard @ 2019-06-24 18:50 UTC (permalink / raw)
  To: cygwin

I've been able to build OpenSSL 1.0.2 with FIPS support on Cygwin 32-bit and native Windows using Visual Studio. The 64-bit edition of Cygwin doesn't build the FIPS module correctly. There is a workaround, but that workaround invalidates the FIPS build requirements, thus the resulting binary will not be approved without a private certification that costs lots of $$$. I'd like to get OpenSSH to work with the OpenSSL I've built under 32-bit Cygwin, but that might require a custom build of OpenSSH. The latest Cygwin uses the newer 1.1.1 branch of OpenSSL, so I don't know if that will cause any compatibility problems.

Having a FIPS 140-2 OpenSSH on a Windows OS is important for those in the financial and government sector. Microsoft's port of OpenSSH uses LibreSSL (I think) and cannot be FIPS certified. It looks like Cygwin is our only hope.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OpenSSH FIPS 140-2
  2019-06-24 18:50 OpenSSH FIPS 140-2 Pinzone, Gerard
@ 2019-06-25  3:06 ` Brian Inglis
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Inglis @ 2019-06-25  3:06 UTC (permalink / raw)
  To: cygwin

On 2019-06-24 12:50, Pinzone, Gerard wrote:
> I've been able to build OpenSSL 1.0.2 with FIPS support on Cygwin 32-bit and 
> native Windows using Visual Studio. The 64-bit edition of Cygwin doesn't
> build the FIPS module correctly. There is a workaround, but that workaround 
> invalidates the FIPS build requirements, thus the resulting binary will not
> be approved without a private certification that costs lots of $$$. I'd like
> to get OpenSSH to work with the OpenSSL I've built under 32-bit Cygwin, but
> that might require a custom build of OpenSSH. The latest Cygwin uses the
> newer 1.1.1 branch of OpenSSL, so I don't know if that will cause any
> compatibility problems.

> Having a FIPS 140-2 OpenSSH on a Windows OS is important for those in the 
> financial and government sector. Microsoft's port of OpenSSH uses LibreSSL
> (I think) and cannot be FIPS certified. It looks like Cygwin is our only
> hope.
I believe the implementation has to be validated and certified by NIST, so if
that is required, you will have to use an implementation with NIST
certification, listed at:
https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules/search

Enter either OpenSSH or OpenSSL in the Module Name box to search.

Check each certification for details of the hardware and software required to be
used to be compliant.

Please also remember the advice to only use FIPS modules where legally required,
and never enable anything which is historical, inactive, or has been revoked, as
it has been broken.

For good security use currently recommended non-FIPS algorithms, ciphers, and
modes.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OpenSSH FIPS 140-2
@ 2019-06-25 13:45 Pinzone, Gerard
  0 siblings, 0 replies; 3+ messages in thread
From: Pinzone, Gerard @ 2019-06-25 13:45 UTC (permalink / raw)
  To: cygwin

I was able to build OpenSSL with FIPS and OpenSSH using those OpenSSL libraries from scratch and install on 32-bit Cygwin.

I'm documenting what I did here and would like some feedback. 

Install Cygwin 32-bit with the following extras:
-----------------------------------------------

Rollback OpenSSL to latest 1.0.2
zlib (all)
Perl (all)
zip
unzip
gcc-g++
make

Extract all files:
-----------------

tar -zxvf openssl-fips-2.0.16.tar.gz
tar -zxvf openssl-1.0.2s.tar.gz
tar -zxvf openssh-8.0p1.tar.gz

Build OpenSSL:
-------------

cd openssl-fips-2.0.16

./config
make
make install

cd ../openssl-1.0.2s

./config fips --with-fipsdir=/usr/local/ssl/fips-2.0
make depend
make
make install

cd apps

Verify build:
------------

./openssl version -a

Install OpenSSL:
---------------

mv /usr/bin/openssl.exe /usr/bin/openssl.exe.old
cp openssl.exe /usr/bin/openssl.exe

Build OpenSSH:
-------------

cd ~/openssh-8.0p1

./configure --with-ssl-dir=/usr/local/ssl --with-ssl-engine
make
make install

Install OpenSSH:
---------------

cp scp.exe /usr/bin/.
cp sftp.exe /usr/bin/.
cp sftp-server.exe /usr/sbin/.
cp ssh.exe /usr/bin/.
cp ssh-add.exe /usr/bin/.
cp ssh-agent.exe /usr/bin/.
cp sshd.exe /usr/sbin/.
cp ssh-keygen.exe /usr/bin/.
cp ssh-keyscan.exe /usr/bin/.
cp ssh-keysign.exe /usr/sbin/.
cp ssh-pkcs11-helper.exe /usr/sbin/.


Verify ssh:
----------

ssh -vvv localhost

Configure sshd:
--------------

ssh-host-config -y
cygrunsrv -S cygsshd

Generate keys:
-------------

ssh-keygen

Test sshd:
---------

ssh localhost

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-25 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 18:50 OpenSSH FIPS 140-2 Pinzone, Gerard
2019-06-25  3:06 ` Brian Inglis
2019-06-25 13:45 Pinzone, Gerard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).