Pure-python forbids using the cryptography package. Only python code and the python stdlib are allowed. The fact that TLS uses AES at all means it might be possible to trick the python ssl module to do arbitrary AES, with some effort.

At the end of the day, the TLS protocol is also part of the ssl module's API surface. It's not the API surface you'd usually interact with, but nothing really stops you from doing so.

On 6/25/23 14:31, Eric Rescorla wrote:
I believe https://cryptography.io/en/latest/ is what you want.

TLS does not use AES in a way that is consistent with what you would get if you just used a typical AES library.
-Ekr


On Sun, Jun 25, 2023 at 10:21 AM Soni L. <[email protected] <mailto:fakedme%[email protected]>> wrote:

    Python doesn't expose raw AES, etc. But it does expose a fairly
    rich TLS library. Wondering if it would be possible to just
    connect a TLS socket to a raw TCP socket and somehow write bytes
    into TLS and get ciphertext out or write bytes into the raw TCP
    socket and get plaintext out.

    The point is to use AES for non-TLS protocols.

    On 6/25/23 14:15, Eric Rescorla wrote:
    I'm not aware of any. Why would you want to do this? Most such
    libraries I am aware of expose low-level primitives or are built
    on libraries which do.

    -Ekr


    On Sun, Jun 25, 2023 at 6:28 AM Soni L. <[email protected]
    <mailto:fakedme%[email protected]>> wrote:

        Has anyone done any work towards tricking a TLS library into
        providing
        cryptographic primitives? We know of similar work with
        regards to
        javacard https://arxiv.org/abs/1810.01662 but not sure if it
        can be
        applied to TLS.

        _______________________________________________
        TLS mailing list
        [email protected]
        https://www.ietf.org/mailman/listinfo/tls


_______________________________________________
TLS mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/tls

Reply via email to