« first day (1948 days earlier)      last day (3230 days later) » 

12:33
hey!
I have written client and server in python. For user authentication, I don't want to send passwords over networks without encryption and hashing. I have knowledge about rsa, but haven't been able to find good docs online to refer. I went through tutorials pythonprogramming.net/… and libraries like passlib. But couldn't examples of sending passwords over network. They tell how store securely in database.
Here is my code bpaste.net/show/3bfd036a4844 I am using klien at backend and requests at frontend for sending a http request with username and password in json format.
@AbhishekBhatia What can you store at the client end?
The client is binary so I could store a public key essentially.
Is that what you are referring to?
@AbhishekBhatia Can you store client-specific information (generated on the client)?
Are you forced to do the authentication via HTTP or can you also use HTTPS or can you even go a protocol level lower with the authentication?
I am not keen on buying on certificate for https.
@AbhishekBhatia Is your application distribution method trusted (e.g. some app store)?
12:40
Yeah.
I right now use HTTP, could use HTTPS but that would require a certificate.
@AbhishekBhatia then get one!
So the best solution in terms of security would be TLS client authentication followed by TLS-SRP followed by some more custom solution (for which I need to know whether you can store data permanently on the user end, so that it survives app restarts)
As your distribution method is trusted you could just pin an untrusted certificate (e.g. the public key) for your app
after all, YOU do the CN validation
I understand you latter comment but not the former one. What data are you suggesting to store permanently on the user end? Also, instances of app at different machine could use the same login password.
I don't get the idea of requiring a certificate and what it does do. I can essentially keep a private key with me send the public key to clients.
@AbhishekBhatia I want to either store a high-entropy secret on the user end (for HMAC or TLS-PSK) which you'd encrypt with the user password or I'd want to store a private key belonging to the user's client certificate to allow TLS client authentication
Different private keys for different users?
12:51
@AbhishekBhatia the certificate gives you a trusted channel from your app to your servers. This alone would suffice for simple "here's my username and password" authentication. and yes I want you to hard-code YOUR server's private key into the app so the app can verify the authenticity of the server without a problem
@AbhishekBhatia every user would have his own private key which he'd use to authenticate against the server
@AbhishekBhatia You don't need to buy a certificate to use HTTPS.
The standard answer is use TLS with a self signed cert added to the client's trust store since you control the client.
also, let's encrypt is no longer in beta
@SmokeDispenser If you control both sides of the equation (i.e. the client isn't a browser), no need to overcomplicate things with a CA.
@TerryChia WTF!? why would you want to add anything to the system wide trust-store!?
It's one more point of failure.
@SEJPM Who said anything about the system wide trust store?
12:55
@SEJPM @TerryChia did not talk about the system wide trust store.
@TerryChia "added to the client's trust store"?
rather about the application's trust store
@TerryChia that depends. It allows for faster respone times in the case the keypair gets compromized
12:58
@SmokeDispenser Not really.
e.g. with (sometimes long) review times, a CA-signed keypair that has been compromised can be replaced
@TerryChia (assuming OCSP is used)
a pinned cert: not so much while the publication isn't through, plus: not every client gets updated right away
@SmokeDispenser You can mimic that yourself pretty easily without trusting a third party CA.
@TerryChia, that's a good point :)
12:59
After all you can just quickly rotate the key on the server end and revoke the old one and everything works without the need to push a client update which ~20% of the user base won't even bother installing
(and usually what I do;))
I'd never recommend adding a third party to the equation unless you are targeting the browser market.
@SEJPM Because OCSP has been proven to work reliably right? /sarcasm
I am not using a browser, it's a desktop application.
Yeah, pinning ones own CA is pretty much a good idea
@TerryChia if you ensure a hard-fail, then yes
13:01
especially, as the trust store can then be reduced to exactly that CA
OCSP has been proven to be the wrong answer. Short lived certificates is the correct one.
(which adds additional security against CA-fail)
But that's deviating from the original question.
@TerryChia gl convincing the admins to update their certs every day
@SEJPM Automatically rotating certificates is a solved problem.
@AbhishekBhatia general consensus: Create a CA certificate that you add to your app's trust store and connect to your server via HTTPS using this CA certificate as only accepted CA. Bonus points if you do something with this (TLS client authentication, TLS-SRP, TLS-PSK, server relief password hashing, ...)
@TerryChia so go ahead and convince the CAs to do that?
@SEJPM that'll not be so easy;)
@TerryChia I'm especially talking about OV and EV CAs...
BTW: I get that the concept of short-lived certs is really good cool
thanks guys! I am kind of new to security, you please tell what you mean by CA certificate and app's trust store. Here's what I can do right now create a self-signed certificate and start a HTTPS server. Then sending a HTTPS request instead of HTTP from client. (klein.readthedocs.org/en/latest/introduction/…)
13:13
A CA certificate is a certificate which's private key can be used to create certificates for other key pairs
(cf. google/wiki)
every half way acceptable programming language's API allows to set a trust store (e.g. trusted root CAs by which trust in other certificates can be established)
@AbhishekBhatia TL;DR: You create a self-signed CA certificate (ask google how to) and store the private key in a secure location. Then you use this key to issue your server certificates (as a normal CA would). The "how-to" of adding it to the app's trust store is really app-dependent :(
13:33
Hello!
Do you know of any hardware that can protect your home PC from a row hammer attack?
@Cerberus ECC RAM maybe?
but you need a server processor for that...
@SEJPM From what I read, ECC offers some protection against it, but it is not invulnerable.
@SEJPM True. I was considering building my new computer with a Xeon/ECC set-up against the likes of row hammer.
@Cerberus it's definitely harder (I think) and I wouldn't know what else to do against rowhammer
@Cerberus SRAM instead of DRAM may also improve it, as the smaller density of the memory makes the attack harder + that kind of memory has active use of transistors to keep the correct value
This article suggests that some types of DDR4 may be immune. ^
@Ferrybig Ah, yes, I read about that too! But is there any available for a normal home computer?
> In addition to purchasing a fast Intel Skylake based system, we also acquired four Crucial Ballistix Sport 2400 MHz, two Crucial Ballistix Elite 2666 MHZ, two Geil Super Luce 2400 MHz, two G.Skill Ripjaws 4 3200 MHz, and two Micron branded 2133 MHz DDR4 memory modules for testing…
Of the twelve memory modules we tested, eight showed bit flips during our 4-hour experiment. And of these eight failures, every memory module that failed at default settings was on DDR4 silicon manufactured by Micron. The Geil branded modules contained SK Hynix and the G.Skill modules contained Samsung silicon.
(From the article.)
This suggests that RAM usung SK Hynix modules may be immune.
Or at least offer better protection than regular ECC does.
13:40
@Cerberus pair that with ECC and that's the best you can do?
@SEJPM Perhaps I should do that!
Let's see whether SK Hynix modules with ECC exist...
@Cerberus or Samsung?
@SEJPM Yeah, but the Samsung still showed the occasional bit flip, so SK Hynix may be better?
13:55
Hmm it does appear to be available.
Do you think my question would be on topic for the main site?
@Cerberus Whether you should buy SK-Hynx ECC RAM? no
How to protect against rowhammer? yes
@SEJPM I rather meant this question title:
24 mins ago, by Cerberus
Do you know of any hardware that can protect your home PC from a row hammer attack?
Then I would post most of the info I have posted here in chat, mainly the table and the quotation.
@Cerberus that sounds like a hardware / product recommendation and this is off-topic
Hmm.
So I should phrase it in the general way you suggested?
"How to protect against row hammer?"
@Cerberus yes, if your tone is "I've heard of rowhammer by reading X, Y, Z, how can I protect against it?", then it should be on-topic
14:01
@SEJPM OK thanks.
you can ask about HW recommendation afterwards on hardwarerecs.stackexchange.com
@SEJPM And if I post the table in my question, asking as a sub-question whether the suggestion made in the article is valid, that certain types of RAM can protect against it?
Because I'm not really able to judge its validity.
@Cerberus if you keep it general ("this suggest certain types of RAM are not affected") then it should be OK
@SEJPM OK because you don't want specific brands to be recommended?
@Cerberus exactly
14:06
OK I'll have to split my question into two parts, then, and ask the second part on hardwarerec.se based on what security.se has to say.
@Cerberus sounds like a plan
Yay.
14:23
0
Q: How can I protect my home/office computer against row hammer?

CerberusRow hammer seems to affect ECC memory less, but ECC is still not immune. I have heard of software mitigations like ANVIL, but that doesn't seem to be 100% row-hammer-proof either. What software or hardware can reliably protect me against row-hammer attacks? I have found one hint, that certain t...

@SEJPM Arsked!
@Cerberus +1 and fixed the links to use HTTPS
Oh haha.
Gracias.

« first day (1948 days earlier)      last day (3230 days later) »