extractaudio: add support for AES-192/256-CM and AES-GCM SRTP suites#176
Merged
Conversation
Extends the crypto suite table in eaud_crypto.c to support: - AES_192_CM_HMAC_SHA1_32/80 - AES_256_CM_HMAC_SHA1_32/80 - AEAD_AES_128_GCM / AEAD_AES_128_GCM_8 - AEAD_AES_256_GCM / AEAD_AES_256_GCM_8 Previously only AES_CM_128_HMAC_SHA1_32/80 were supported. Suites are now mapped directly to the corresponding libsrtp2 policy-setter functions instead of hand-patching a default policy, and the base64 key/salt length validation is fixed to correctly handle key sizes that require standard base64 padding (anything not a multiple of 3 bytes), which the old code rejected outright.
Member
|
@pksml85 thanks for submission! Would be nice if you can make a follow-up PR with some pre-captured test recording using newly supported algorithms to extend tests/extractaudio. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the crypto suite table in
eaud_crypto.cto support:AES_192_CM_HMAC_SHA1_32/_80AES_256_CM_HMAC_SHA1_32/_80AEAD_AES_128_GCM/AEAD_AES_128_GCM_8AEAD_AES_256_GCM/AEAD_AES_256_GCM_8Previously only
AES_CM_128_HMAC_SHA1_32/_80were supported.Implementation notes
Suites are now mapped directly to the corresponding libsrtp2 policy-setter
functions instead of hand-patching a default policy. This also fixes the
base64 key/salt length validation, which previously rejected any key
whose encoded length required standard padding (i.e. any suite whose
key+salt size isn't a multiple of 3 bytes) -- which is all of the new
suites above except the original 128-bit ones.
Testing
Applied against a real-world pair of SRTP-encrypted PCAPs
(
AEAD_AES_256_GCM_8) and confirmed it produces a correctlychannel-mapped stereo output file.
Additionally validated during development via synthetic round-trip tests (encrypting test packets with libsrtp2 directly and confirming correct decryption) across one representative suite from each cipher family (128-bit CM, 192-bit CM, 256-bit GCM), plus a regression check against the original 128-bit CM suite.