noloader / POWER8-crypto

The unoffical guide to POWER8 in-core crypto
4 stars 0 forks source link

Code efficency for POWER8 AES/SHA instructions #3

Open munroesj52 opened 4 years ago

munroesj52 commented 4 years ago

I have built cryptopp and profiled cryptest. Seeing a number coding issues that can be improved.

See: https://github.com/noloader/SHA-Intrinsics/issues/5#issuecomment-609078061

Posting here as I dont seem to have permissions to post issues to cryptopp itself.

noloader commented 4 years ago

Posting here as I dont seem to have permissions to post issues to cryptopp itself.

That's weird. Where are you trying to post/add an issue? Can you provide the URL?

munroesj52 commented 4 years ago

Looking noloader/cryptopp itself there is not link that I can see for issues.

Should be between "code" and "pull requests".

On Mon, Apr 20, 2020 at 1:51 PM Jeffrey Walton notifications@github.com wrote:

Posting here as I dont seem to have permissions to post issues to cryptopp itself.

That's weird. Where are you trying to post/add an issue? Can you provide the URL?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/noloader/POWER8-crypto/issues/3#issuecomment-616742927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIEI2IOYQ64WQU5OKZLUHJ3RNSKTBANCNFSM4MMU54SA .

noloader commented 4 years ago

Looking noloader/cryptopp itself there is not link that I can see for issues.

That's my testing fork.

If you want to file issues with the Crypto++ library, then it is located at Wei Dai's GitHub: weidai11/ cryptopp.

For completeness, here is the library's homepage: Crypto++ website.

noloader commented 4 years ago

@munroesj52 ,

I added you as a coauthor on the book. I think you have a lot of good stuff to add. Add to the book at your leisure.

The book is built with DocBook. DocBook is just a bunch of XML. Any text editor will do for editing. The instructions to setup DocBook are in the PDF DocBook Installation on Ubuntu.

If you don't want it, then please let me know. It is no big deal to me. Segher Boessenkool already turned it down.

munroesj52 commented 4 years ago

Sorry for the delayed response, I needed to think about what I can contribute and have the time/skills for,

My weakest skill is C++ templates because they tend to hide details that I like to analyze closely (generated assembler and instruction timing). I also don't feel comfortable writing documentation until I have written and analyzed the code.

So I would prefer write a straight C versions of SHA/AES (inspired by your work) but focused on exploiting PowerISA and ABI. Dealing with the P8/9 differences and provide guidance on IFUNC dynamic platform optimizations. The Resulting code and analysis would be included with PVECLIB (vec_crypto_ppc.h).

Then we can review, discuss and agree on what should be covered in your document (C++ Templates etc).

Is this approach reasonable and acceptable to you?

On Tue, Apr 28, 2020 at 6:46 PM Jeffrey Walton notifications@github.com wrote:

@munroesj52 https://github.com/munroesj52 ,

I added you as a coauthor on the book. I think you have a lot of good stuff to add. Add to the book at your leisure.

The book is built with DocBook. DocBook is just a bunch of XML. Any text editor will do for editing. The instructions to setup DocBook are in the PDF DocBook Installation on Ubuntu https://github.com/noloader/POWER8-crypto/blob/master/docbook.pdf.

If you don't want it, then please let me know.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/noloader/POWER8-crypto/issues/3#issuecomment-620911676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIEI2IONUEAXQPMXLCGAHQLRO5TETANCNFSM4MMU54SA .

noloader commented 4 years ago

Hi @munroesj52 ,

So I would prefer write a straight C versions of SHA/AES (inspired by your work) but focused on exploiting PowerISA and ABI

That's fine.

The work is for the development community at large. Do what is best for them.

Don't worry about me. You don't have to manage an ego because in my mind's eye, this stuff belongs to the world and not me. So just do what is best for the whole, and not an individual.