aws_lc_rs/unstable/
kem.rs

1// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0 OR ISC
3
4use core::fmt::Debug;
5
6use crate::kem::Algorithm;
7
8#[deprecated(note = "use aws_lc_rs::kem::{ML_KEM_512, ML_KEM_768, ML_KEM_1024}")]
9pub use crate::kem::{ML_KEM_1024, ML_KEM_512, ML_KEM_768};
10
11#[non_exhaustive]
12#[derive(Clone, Copy, Debug, PartialEq)]
13pub enum AlgorithmId {}
14
15impl crate::kem::AlgorithmIdentifier for AlgorithmId {
16    #[inline]
17    fn nid(self) -> i32 {
18        unreachable!("There are no AlgorithmIds")
19    }
20}
21
22impl crate::sealed::Sealed for AlgorithmId {}
23
24/// Retrieve an unstable KEM [`Algorithm`] using the [`AlgorithmId`] specified by `id`.
25/// May return [`None`] if support for the algorithm has been removed from the unstable module.
26/// # ⚠️ Warning
27/// This function currently only returns [`None`].
28#[must_use]
29pub const fn get_algorithm(_id: AlgorithmId) -> Option<&'static Algorithm<AlgorithmId>> {
30    None
31}