google / google/conscrypt

Missing Override in OpenSSLCipherRSA

Open
#317 9 comments 0 reactions 1 assignee Claimed by @flooey View on GitHub
Dominant language
Java
Stars
1.4k
Forks
326
Avg merge
16h 22m
Merged PRs (30d)
17

Description

CipherSpi includes 3 overloads of `engineDoFinal`. OpenSSLCipherRSA overloads 2 of them, but not the 3rd one `engineDoFinal(ByteBuffer, ByteBuffer)`. This method is called by Cipher when invoking `doFinal`.

Unfortunately, the CipherSpi implementation of `engineDoFinal` calls `Cipher.bufferCrypt`, which is slow. It makes array copies of the inputs if they are not backed by arrays. When using direct ByteBuffers, multiple unnecessary allocations and copies are made.

CC: @nmittler

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.