Algorithm Selection logo

Algorithm Selection

Organization
RedHatProductSecurity
algorithm-selection

Apply when selecting, reviewing, or configuring cryptographic algorithms, cipher suites, protocol versions, or key exchange mechanisms. Covers banned/deprecated/recommended algorithms, post-quantum readiness, key management, and OpenSSL API migration.

Overview

PublisherRedHatProductSecurity
Repositoryprodsec-skills
Skill namealgorithm-selection
Stars
56
Forks
9
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by RedHatProductSecurity on GitHub. Read the source before you install it.

Installation

Install the Algorithm Selection AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/RedHatProductSecurity/prodsec-skills/tree/main/module/skills/algorithm-selection
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/RedHatProductSecurity/prodsec-skills.git /tmp/prodsec-skills
mkdir -p .claude/skills
cp -r /tmp/prodsec-skills/module/skills/algorithm-selection .claude/skills/algorithm-selection
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Algorithm Selection in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Algorithm Selection on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Algorithm Selection is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cryptographic Algorithm Selection and Post-Quantum Readiness

Reference for which cryptographic algorithms to use, which to avoid, and how to prepare for post-quantum cryptography.

Banned (Insecure) Algorithms

NEVER use these algorithms. They are cryptographically broken.

TypeBanned
HashMD2, MD4, MD5, SHA-0
SymmetricRC2, RC4, Blowfish, DES, 3DES
Key ExchangeStatic RSA, Anonymous Diffie-Hellman

Deprecated (Legacy/Weak) Algorithms

Avoid in new designs. Prioritize migration away from these.

TypeDeprecatedIssue
HashSHA-1Collision attacks demonstrated
SymmetricAES-CBC, AES-ECBUnauthenticated; ECB leaks patterns
SignatureRSA with PKCS#1 v1.5 paddingPadding oracle attacks
Key ExchangeDHE with weak/common primesVulnerable to precomputation attacks

Recommended and Post-Quantum Ready Algorithms

Symmetric Encryption

  • Standard: AES-GCM (AEAD), ChaCha20-Poly1305
  • PQC requirement: prefer AES-256 keys -- resistant to Grover's algorithm
  • Avoid: custom crypto or unauthenticated modes

Key Exchange (KEM)

  • Standard: ECDHE (X25519 or secp256r1)
  • Hybrid key exchange (classical + PQC) when supported:
    • Preferred: X25519MLKEM768 (X25519 + ML-KEM-768)
    • Alternative: SecP256r1MLKEM768 (P-256 + ML-KEM-768)
    • High assurance: SecP384r1MLKEM1024 (P-384 + ML-KEM-1024)
  • Pure PQC: ML-KEM-768 (baseline) or ML-KEM-1024. Avoid ML-KEM-512 unless explicitly risk-accepted.
  • Use vendor-documented identifiers (RFC 9242/9370). Remove legacy/draft "Hybrid-Kyber" groups and hardcoded OIDs.

Signatures and Certificates

  • Standard: ECDSA (P-256)
  • PQC migration: continue using ECDSA (P-256) for mTLS and code signing until hardware-backed (HSM/TPM) ML-DSA is available.
  • Hardware requirement: do not enable PQC ML-DSA signatures with software-only keys. Require HSM/TPM storage.

Protocol Versions

  • (D)TLS: enforce (D)TLS 1.3 only (or later)
  • IPsec: enforce IKEv2 only
    • Use ESP with AEAD (AES-256-GCM)
    • Require PFS via ECDHE
    • Implement RFC 9242 and RFC 9370 for hybrid PQC (ML-KEM + ECDHE)
    • Ensure re-keys (CREATE_CHILD_SA) maintain hybrid algorithms
  • SSH: enable only vendor-supported PQC/hybrid KEX (e.g., sntrup761x25519)

Secure Implementation Guidelines

General Best Practices

  • Configuration over code: expose algorithm choices in config/policy to allow agility without code changes.
  • Key management:
    • Use KMS/HSM for key storage
    • Generate keys with a CSPRNG
    • Separate encryption keys from signature keys
    • Rotate keys per policy
    • NEVER hardcode keys, secrets, or experimental OIDs
  • Telemetry: capture negotiated groups, handshake sizes, and failure causes to monitor PQC adoption.
  • Avoid custom crypto: use well-vetted libraries; never implement your own primitives.

Deprecated OpenSSL APIs (C/C++)

Never use these deprecated functions. Use the EVP high-level APIs.

DeprecatedReplacement
AES_encrypt(), AES_decrypt()EVP_EncryptInit_ex() with EVP_aes_256_gcm()
RSA_new(), RSA_free(), RSA_get0_n()EVP_PKEY_new(), EVP_PKEY_free()
SHA1_Init()EVP_DigestInit_ex() with SHA-256 or stronger
HMAC() with SHA-1EVP_Q_MAC() with SHA-256 or stronger

AES-256-GCM Example (C/OpenSSL)

c
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
if (!ctx) handle_error();

if (EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, key, iv) != 1)
    handle_error();

int len, ciphertext_len;
if (EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, plaintext_len) != 1)
    handle_error();
ciphertext_len = len;

if (EVP_EncryptFinal_ex(ctx, ciphertext + len, &len) != 1)
    handle_error();
ciphertext_len += len;

EVP_CIPHER_CTX_free(ctx);

HMAC-SHA256 Example (C/OpenSSL)

c
EVP_Q_MAC(NULL, "HMAC", NULL, "SHA256", NULL,
          key, key_len, data, data_len,
          out, out_size, &out_len);

Implementation Checklist

  • No banned algorithms (MD5, RC4, DES, 3DES) in use anywhere
  • SHA-1 and AES-CBC/ECB identified and scheduled for migration
  • AES-GCM or ChaCha20-Poly1305 used for symmetric encryption
  • ECDHE (X25519 or P-256) used for key exchange
  • Hybrid PQC key exchange evaluated and enabled where supported
  • TLS 1.3 enforced; TLS 1.0/1.1/1.2 disabled or on migration plan
  • Keys stored in KMS/HSM; no hardcoded keys or secrets
  • Algorithm choices in configuration, not hardcoded
  • Deprecated OpenSSL APIs replaced with EVP equivalents
  • PQC adoption telemetry in place

Frequently asked questions

What does the Algorithm Selection AI skill do?

Apply when selecting, reviewing, or configuring cryptographic algorithms, cipher suites, protocol versions, or key exchange mechanisms. Covers banned/deprecated/recommended algorithms, post-quantum readiness, key management, and OpenSSL API migration.

Why use Algorithm Selection on TypingMind?

Because you install it once and use it with any model. Algorithm Selection is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Algorithm Selection in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/RedHatProductSecurity/prodsec-skills/tree/main/module/skills/algorithm-selection. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Algorithm Selection?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Algorithm Selection?

As many as you like. As long as a model supports skills, you can use Algorithm Selection with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Algorithm Selection AI skill free?

Yes. It is published on GitHub by RedHatProductSecurity under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇