Synss / python-mbedtls

Cryptographic library with an mbed TLS back end
MIT License
79 stars 28 forks source link

pk: impl ECDHBase key property setter #19

Closed stepheny closed 5 years ago

Synss commented 5 years ago

On a side note, as far as I am concerned, chacha/poly (your previous patch) is enough to grant a new release. Do you plan on adding more functionality soon or is it ok to prepare a new release next week?

Synss commented 5 years ago

Casting to the private key to MPI is probably smarter than statically requiring an MPI as in my patch. Please just:

    def _private_key(self, priv):
        cdef _mpi.MPI c_priv = _mpi.MPI(priv)
        _mpi.mbedtls_mpi_copy(&self._ctx.d, &c_priv._ctx)

or something. Thank you.

stepheny commented 5 years ago

Thanks for the advice. Your approach is much better. I didn't know we could use c style typed argument directly in cython, and now I've learnt. Feel free to arrange the release at your convenience. I think all my needs are met now. I mainly do some prototype of server apps and embeded system client. Your library is really handy to learn and test mbedtls. Thank you for your work.