[ ] I've run .script/generate_boilerplate_files_with_gyb and included updated generated files in a commit of this pull request
Motivation:
Security.framework has change to return the exact bit count of the key size instead of the block size in bytes in macOS 14 beta and aligned releases. However, BoringSSL and the previous implementation relyed on that.
SecKeyCopyAttributes is also rather expensive to call and keySizeInBits is accessed immediately (twice) after initialisation.
Modifications:
call SecKeyGetBlockSize(_:)`` instead of looking up thekSecAttrKeySizeInBits` in the attributes dictionary.
Checklist
If you've made changes to
gyb
files.script/generate_boilerplate_files_with_gyb
and included updated generated files in a commit of this pull requestMotivation:
Security.framework has change to return the exact bit count of the key size instead of the block size in bytes in macOS 14 beta and aligned releases. However, BoringSSL and the previous implementation relyed on that.
SecKeyCopyAttributes
is also rather expensive to call andkeySizeInBits
is accessed immediately (twice) after initialisation.Modifications:
call
SecKeyGetBlockSize(_:)`` instead of looking up the
kSecAttrKeySizeInBits` in the attributes dictionary.Result:
test pass again and allocations are reduced.