RSA-2048

Side-channel claim limit. Nothing on this page claims constant-time behaviour or side-channel resistance for any target: the side-channel harness covers nothing (finding A48) and no measurement exists. The Rust and C cores are designed for constant time and unmeasured; managed runtimes (JIT, GC, bounds checks) make no timing claim. Where this page names constant-time or side-channel techniques, in prose or in code, they are design intent or recommendations, not measured properties.

⚠️ Transitional Algorithm Warning

RSA-2048 is provided only for backward compatibility and hybrid cryptography during migration to post-quantum algorithms. This algorithm will be deprecated by 2030.

Do not use RSA-2048 for new systems. Use ML-KEM or other PQC algorithms instead.

Overview

RSA-2048 is a classical public-key cryptosystem based on the difficulty of factoring large integers. While secure against classical computers, it is vulnerable to quantum attacks using Shor’s algorithm.

Security Level

  • Classical Security: ~112 bits
  • Quantum Security: 0 bits (completely broken)
  • NIST Category: Not quantum-resistant

Algorithm Details

Parameters

  • Key Size: 2048 bits (256 bytes)
  • Public Exponent: 65537 (F₄)
  • Padding: OAEP for encryption, PSS for signatures
  • Hash Function: SHA-256

Key Sizes

  • Public Key: 256 bytes
  • Private Key: 256 bytes (P and Q factors)
  • Ciphertext: 256 bytes
  • Signature: 256 bytes

Use Cases

Acceptable Uses (Until 2030)

  • Legacy system compatibility
  • Hybrid cryptography with PQC
  • Transition period operations
  • Backward compatibility requirements

Unacceptable Uses

  • New system deployments
  • Long-term data protection
  • Post-2030 operations
  • Primary security mechanism

Implementation Status

Nine targets ship RSA-2048 at the one release line, 1.0.0-rc.7 (its per-ecosystem spellings are on the Installation Guide); the 3.1.0 the table once carried was an internal version that was never published. The WebAssembly tree has no RSA wrapper. RSA-2048 is not a release-catalog profile, so no validation, packaging or interoperability claim is made for it on any target.

The Notes column says where each port’s big-integer arithmetic and its SHA-256 (OAEP, PSS) come from, as read from its source.

Platform Status Notes
Go ✅ Complete math/big; SHA-256 from the standard library’s crypto/sha256; no crypto/rsa
Rust ✅ Complete num-bigint; SHA-256 from metamui-sha2; no unsafe in the crate
Python ✅ Complete Python integers; SHA-256 from the package’s compiled hashes (built from the C tree)
C ✅ Complete own big-integer code (rsa_bigint.c) and SHA-256 (rsa_sha256.c)
TypeScript ✅ Complete JavaScript BigInt; SHA-256 and randomness from Node’s crypto module
Swift ✅ Complete own BigInt type; SHA-256 from MetaMUISha2
Java ✅ Complete java.math.BigInteger; SHA-256 from java.security.MessageDigest
C# ✅ Complete System.Numerics.BigInteger; SHA-256 from System.Security.Cryptography; builds for net10.0
Kotlin ✅ Complete java.math.BigInteger; SHA-256 from java.security.MessageDigest
WASM — no wrapper (metamui-crypto-wasm/DEFERRED-WRAPPERS.md)

Migration Path

Current Use Replace With Migration Complexity
Key Exchange ML-KEM-768 Medium
Digital Signatures ML-DSA-65 Medium
Encryption ML-KEM + AES-256-GCM High
Authentication Falcon-512 Low

Hybrid Mode Example

// Use both RSA and PQC during transition
func HybridEncrypt(data []byte) ([]byte, error) {
    // RSA for compatibility
    rsaCt, _ := rsaKey.Encrypt(data)
    
    // ML-KEM for quantum resistance
    mlkemCt, _ := mlkemKey.Encapsulate(data)
    
    // Return both ciphertexts
    return append(rsaCt, mlkemCt...), nil
}

Security Considerations

Vulnerabilities

  • Quantum Attack: Completely broken by Shor’s algorithm
  • Classical Attacks: Factorization advances ongoing
  • Side Channels: Timing attacks on naive implementations
  • Padding Attacks: Must use OAEP/PSS correctly

Mitigations

  • Use only as transitional solution
  • Implement in hybrid mode with PQC
  • Apply constant-time operations
  • Plan complete migration by 2030

Standards Compliance

  • PKCS#1 v2.2: RSA Cryptography Specifications
  • NIST SP 800-56B Rev. 2: Key Establishment Using RSA
  • FIPS 186-5: Digital Signature Standard (being phased out)

API Reference

Go

import "github.com/SovereignWallet-Network/metamui-crypto-go/rsa2048"

key, err := rsa2048.GenerateKey()
ciphertext, err := key.PublicKey.Encrypt(message)
plaintext, err := key.Decrypt(ciphertext)

Rust

use metamui_rsa2048::{PrivateKey, PublicKey};

let key = PrivateKey::generate()?;
let ciphertext = key.public_key().encrypt(&message)?;
let plaintext = key.decrypt(&ciphertext)?;

Python

from metamui_crypto.rsa2048 import generate_key

key = generate_key()
ciphertext = key.public_key.encrypt(message)
plaintext = key.decrypt(ciphertext)

TypeScript

import { generateKey } from '@metamui/rsa2048';

const key = await generateKey();
const ciphertext = key.publicKey.encrypt(message);
const plaintext = key.decrypt(ciphertext);

Deprecation Timeline

  • 2025 Q1: RSA-2048 added for transition
  • 2025-2027: Hybrid mode recommended
  • 2028: Deprecation warnings begin
  • 2029: Feature freeze, security fixes only
  • 2030 Q1: Complete removal from library

Resources