eXist-db / expath-crypto-module

expath
GNU Lesser General Public License v2.1
1 stars 9 forks source link

[feature] Functions for listing hash providers and algorithms and specifying them when hashing #8

Open adamretter opened 5 years ago

adamretter commented 5 years ago

Requires - https://github.com/claudius108/crypto-java-lib/pull/5

Adds the functions:

  1. crypto:hash-providers() as xs:string*
  2. crypto:hash-algorithms($provider-name as xs:string) as xs:string*
  3. crypto:hash-algorithms() as map(xs:string, xs:string*)
  4. crypto:hash($data as item(), $algorithm as xs:string, $encoding as xs:string, $provider as xs:string)
joewiz commented 5 years ago

This seems like a valuable PR. +1 to merging it or at least advancing discussion.

joewiz commented 5 years ago

@claudius108 During this week's Community Call, the group took a look at this and thought it looked quite useful. What are your thoughts? Also, everyone is excited to have SHA256RSA, which @nsincaglia told us about—when you're able ;)

claudius108 commented 5 years ago

SHA256RSA works already, I will push the changes after Nick Sincaglia will confirm also this.

As to the listing functions, in the new version of specification I added such functions, but more comprehensive. But you can keep these, if you want, it is up to you.

nsincaglia commented 5 years ago

I was able to confirm that the SHA256RSA encryption algorithm produced a verified output and therefore I concluded the algorithm was working properly.

Nick

joewiz commented 5 years ago

Thanks, Claudius, could you point me to the URL with the version of the spec that contains the functions you mentioned?

joewiz commented 5 years ago

I ask because maybe there's a way to bring this PR in line with the spec. Are there any implementations of your spec's version of the functions in question?

adamretter commented 5 years ago

@claudius108 Where can we find the latest version of the spec please?

claudius108 commented 5 years ago

https://github.com/claudius108/expath-cg/blob/master/specs/crypto/crypto-new.html

dizzzz commented 4 years ago

what to do with this PR?

line-o commented 3 years ago

@adamretter can this be rebased?

adamretter commented 3 years ago

@line-o Possibly... I can try... but it is from 2008. So I am not sure what has been incorporated in the mean-time! let me try...

adamretter commented 3 years ago

Seems there is a corresponding PR to resolve here - https://github.com/expath/crypto-java/pull/5

adamretter commented 3 years ago

@line-o Okay, as requested I have rebased this. It requires that expath/crypto-java#5 is merged and a release of that published, but otherwise I believe this is ready to land.

joewiz commented 3 years ago

@adamretter Do you know which (if any) spec these functions are intended to align with? I ask because as described in #41 I'd like to nail down the relationship between the spec(s) and the eXist implementation.

joewiz commented 3 years ago

p.s. I think my merge of #45 caused a new conflict.

adamretter commented 3 years ago

Do you know which (if any) spec these functions are intended to align with

@joewiz To be honest, I don't. This pull request is from 2018. It may be that I just recognised that these auxiliary functions may be useful, or that I followed a spec at that time. I am afraid I don't recall...

adamretter commented 3 years ago

p.s. I think my merge of #45 caused a new conflict.

@joewiz Ah ha. No worries, I have resolved and rebased that now...