Skip to content

Commit

Permalink
Deprecate kyber-specific key encoding in FFI/Python
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Oct 15, 2024
1 parent 46925f1 commit f37999f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/ffi/ffi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1528,9 +1528,11 @@ BOTAN_FFI_EXPORT(3, 1) int botan_privkey_load_kyber(botan_privkey_t* key, const

BOTAN_FFI_EXPORT(3, 1) int botan_pubkey_load_kyber(botan_pubkey_t* key, const uint8_t pubkey[], size_t key_len);

BOTAN_FFI_DEPRECATED("Use generic botan_privkey_view_raw")
BOTAN_FFI_EXPORT(3, 1)
int botan_privkey_view_kyber_raw_key(botan_privkey_t key, botan_view_ctx ctx, botan_view_bin_fn view);

BOTAN_FFI_DEPRECATED("Use generic botan_pubkey_view_raw")
BOTAN_FFI_EXPORT(3, 1)
int botan_pubkey_view_kyber_raw_key(botan_pubkey_t key, botan_view_ctx ctx, botan_view_bin_fn view);

Expand Down
2 changes: 2 additions & 0 deletions src/python/botan3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,7 @@ def to_raw(self):
return _call_fn_viewing_vec(lambda vc, vfn: _DLL.botan_pubkey_view_raw(self.__obj, vc, vfn))

def view_kyber_raw_key(self):
"""Deprecated: use to_raw() instead"""
return _call_fn_viewing_vec(lambda vc, vfn: _DLL.botan_pubkey_view_kyber_raw_key(self.__obj, vc, vfn))

def fingerprint(self, hash_algorithm='SHA-256'):
Expand Down Expand Up @@ -1447,6 +1448,7 @@ def to_raw(self):
return _call_fn_viewing_vec(lambda vc, vfn: _DLL.botan_privkey_view_raw(self.__obj, vc, vfn))

def view_kyber_raw_key(self):
"""Deprecated: use to_raw() instead"""
return _call_fn_viewing_vec(lambda vc, vfn: _DLL.botan_privkey_view_kyber_raw_key(self.__obj, vc, vfn))

def export(self, pem=False):
Expand Down

0 comments on commit f37999f

Please sign in to comment.