SUSE Support

Here When You Need Us

ssh-keygen fails to create RSA keys of length in bits not dividable by 8

This document (7015284) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 SP3
SUSE Linux Enterprise Server 11 SP2

Situation

Running ssh-keygen with an "odd" (not dividable by 8) key length may fail without further explanation in FIPS mode:

$ ssh-keygen -v -b 2049 -t rsa -N  "1234" -f testkey.rsa
Generating public/private rsa key pair.
rsa_generate_private_key: key generation failed.
$

 

Resolution

Use an RSA key length dividable by 256 as defined by ANSI X9.31.

Cause

According to ANSI X9.31, the length of an RSA key must be a multiple of 32 bytes, or 256 bits. Keys having a length that is not a multiple of 8 bits do not work and fail the FIPS RSA key validation of OpenSSL 0.9.8j.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7015284
  • Creation Date: 27-Jun-2014
  • Modified Date:05-Mar-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.