SHA512 encryption methods

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SHA512 encryption methods

Dave Bruhn
So after some of the talks at LDC, I've come to the conclusion that I need to invest some energy into a new encryption method for sensitive data.  In particular, I'm looking into encryption using SHA512.

Does anyone have any methods for encrypting text via SHA512 that they would be willing to share?

Thanks!
Dave
---
Dave Bruhn
Systems Analyst
North Carolina Hospital Association
PO Box 4449
Cary, NC 27519-4449
919-677-4145 (office)
[hidden email]
http://www.ncha.org


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA512 encryption methods

Jolle Carlestam-3
16 sep 2013 kl. 20:04 skrev Dave Bruhn <[hidden email]>:

> So after some of the talks at LDC, I've come to the conclusion that I need to invest some energy into a new encryption method for sensitive data.  In particular, I'm looking into encryption using SHA512.
>
> Does anyone have any methods for encrypting text via SHA512 that they would be willing to share?


There is a library available on our Centos distribution that can help. sha512sum
Does not seem to be around on my Mac.

You can call it using the shell method demonstrated at LDC:

shell('echo -n ' + 'Dave Bruhn' + ' | sha512sum')

-> 2d54f3c8a945a84a0f8472dfc8fc6e911b2d03ee1b1211e5beb0bf49c2355ef80a79927677463fbcc3980a1e7809cb33c7373e1caeb7777eb9a02ed446dbfc24  -


A side note for the picky. Using SHA-512 is not encrypting, it is hashing.

A sidier side note targeted at Dave in particular. You know that SHA-512 is developed by the NSA, right? ;-)

HDB
Jolle

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA512 encryption methods

Jolle Carlestam-3
17 sep 2013 kl. 12:25 skrev Jolle Carlestam <[hidden email]>:

> There is a library available on our Centos distribution that can help. sha512sum
> Does not seem to be around on my Mac.

Actually, this is a better version since it works on both Mac and Centos producing the same result;


shell('echo -n ' + 'Dave Bruhn' + ' | openssl dgst -sha512')

HDB
Jolle

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA512 encryption methods

Bil Corry-3
Yes, openssl is how I would do it.  Note that SHA is a hash function, and so can't be reversed.

- Bil

On Sep 17, 2013, at 1:11 PM, Jolle Carlestam <[hidden email]> wrote:

> 17 sep 2013 kl. 12:25 skrev Jolle Carlestam <[hidden email]>:
>
>> There is a library available on our Centos distribution that can help. sha512sum
>> Does not seem to be around on my Mac.
>
> Actually, this is a better version since it works on both Mac and Centos producing the same result;
>
>
> shell('echo -n ' + 'Dave Bruhn' + ' | openssl dgst -sha512')
>
> HDB
> Jolle
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA512 encryption methods

Jolle Carlestam-3
17 sep 2013 kl. 17:48 skrev Bil Corry <[hidden email]>:

> Yes, openssl is how I would do it.  Note that SHA is a hash function, and so can't be reversed.
>
> - Bil

Here's a bonus method to master it:

define jc_sha512(string::string) => {
        return string(shell('echo -n "' + #string '" | openssl dgst -sha512')) -> trim &
}
local(enc_string) = 'test'

'<pre>'
jc_sha512(#enc_string)
'</pre>'

Note it requires the Lasso 9 shell method that was distributed for all participants of the LDC 2013 in Niagara Falls.


Bil; how safe would you consider SHA-512 to be? Considering that it was developed by NSA...

HDB
Jolle

#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA512 encryption methods

Dave Bruhn
Now, let's say I wanted to hash it 50 times.  Which is the faster process: looping inside the method, or putting the loop outside of the method?  Does it even matter?

In other words:

Example 1:
===
loop(50) => {
        jc_sha512('this string')
}

define jc_sha512(string::string) => {
        return string(shell('echo -n "' + #string '" | openssl dgst -sha512')) -> trim &
}
===

Or Example 2:
===
jc_sha512('this string')

define jc_sha512(string::string) => {
        loop(50) => {
                return string(shell('echo -n "' + #string '" | openssl dgst -sha512')) -> trim &
        }
}
===

Dave
---
Dave Bruhn
Systems Analyst
North Carolina Hospital Association
PO Box 4449
Cary, NC 27519-4449
919-677-4145 (office)
[hidden email]
http://www.ncha.org

On Sep 17, 2013, at 11:55 AM, Jolle Carlestam wrote:

> 17 sep 2013 kl. 17:48 skrev Bil Corry <[hidden email]>:
>
>> Yes, openssl is how I would do it.  Note that SHA is a hash function, and so can't be reversed.
>>
>> - Bil
>
> Here's a bonus method to master it:
>
> define jc_sha512(string::string) => {
> return string(shell('echo -n "' + #string '" | openssl dgst -sha512')) -> trim &
> }
> local(enc_string) = 'test'
>
> '<pre>'
> jc_sha512(#enc_string)
> '</pre>'
>
> Note it requires the Lasso 9 shell method that was distributed for all participants of the LDC 2013 in Niagara Falls.
>
>
> Bil; how safe would you consider SHA-512 to be? Considering that it was developed by NSA...
>
> HDB
> Jolle
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: SHA512 encryption methods

Jolle Carlestam-3
In reply to this post by Jolle Carlestam-3
Well the second example would not return what you expect it to...
Take a look at the code again.

But once you got that cleared up. How about this:

define jc_sha512(string::string, loop::integer = 1) => {
        loop(#loop) => {
                #string = string(shell('echo -n "' + #string '" | openssl dgst -sha512')) -> trim &
        }
        return #string
}

!! Not tested !!

HDB
Jolle

17 sep 2013 kl. 17:55 skrev Jolle Carlestam <[hidden email]>:

> 17 sep 2013 kl. 17:48 skrev Bil Corry <[hidden email]>:
>
>> Yes, openssl is how I would do it.  Note that SHA is a hash function, and so can't be reversed.
>>
>> - Bil
>
> Here's a bonus method to master it:
>
> define jc_sha512(string::string) => {
> return string(shell('echo -n "' + #string '" | openssl dgst -sha512')) -> trim &
> }
> local(enc_string) = 'test'
>
> '<pre>'
> jc_sha512(#enc_string)
> '</pre>'
>
> Note it requires the Lasso 9 shell method that was distributed for all participants of the LDC 2013 in Niagara Falls.
>
>
> Bil; how safe would you consider SHA-512 to be? Considering that it was developed by NSA...
>
> HDB
> Jolle
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>