« first day (1841 days earlier)      last day (2838 days later) » 

1:38 AM
Hey! I'm new to crypto and I wanted to know if it is okay if i used a one way hash (AES 256) on an encrypted data (data encrypted using the AES CBC mode)?

What I'm trying to do is H(E(data)).

Is there a way to do this in a better way? Thank you!
 
 
5 hours later…
6:56 AM
@Mukund AES256 isn't really a hash.
And you didn't specify what you're trying to achieve.
2
What you're talking about sounds a bit like encrypt-then-mac, which is a secure way to build authenticated encryption, but as always, details matter.
 
 
7 hours later…
1:54 PM
I wonder why I didn’t find that one back in the days when I needed it… ;)
2
 
 
2 hours later…
4:13 PM
@co
@CodesInChaos Thanks for the reply. What I meant to say is SHA256 and not AES 256. My bad.

What I'm trying to do is encrypt-then-Mac. Are there any issues with the way I plan to do it?

Details on what I'm trying to do: I need to create a one-way hash of the encrypted text.
 
A hash is no MAC
A MAC has a key
 
Right! My bad, again. What I need to do is create a one-way hash of the encrypted text. Any suggestions on that? Is it okay if I hashed the encrypted data using the SHA256 algorithm?
 
4:33 PM
You're only saying what you're doing but not what you want to achieve with it.
 
 
1 hour later…
5:54 PM
would it be a bad question to ask "What exactly is a 'garbled circuit'?"? There are plenty of questions about how to use them, but I haven't seen anything that defines what they are/what they're for. I ask because it seems like I might just get told to look it up
but sometimes it's nice to have an answer that is more compact then a complete research paper on the subject
is this question about defining "circuits" basically the same ?
 
@EllaRose I think it's about obfuscating circuits in some way.
 
I was thinking that too, based off what I could gather from the questions about it
would it be inappropriate to pose it as a question on the site?
I just don't want it to get closed as a reference request or just "read the paper" or whathaveyou
 
I'm generally fine with introductory questions, as long as they're not overly broad.
 
ok, then I'll ask :)
well, maybe not. That question I linked seems to be the question I was thinking of, maybe. idkkk
 
That question only explains what a circuit is and that you can express functions as circuits.
But it doesn't really go into garbled circuits.
 
6:07 PM
I see, I guess I need to understand circuits first
 
If a function has no loops/recursion you can express it as a linear sequence of simple instructions.
If you go down to the simplest instructions you just have not and and or even just nand on single bits.
which can be implemented using hardware gates
 
that makes sense
 
6:39 PM
@e-sushi you can always edit it in, if you feel it improves the post ;)
 
@EllaRose It is a circuit that is garbled :)
 
TL;DR: (IIRC) circuits = programs
just a nicer representation for some applications (like FHE)
 
7:00 PM
@SEJPM and a not-nicer representation for just about everything else :)
No loops, for example.
 
@mikeazo
verb (used with object), garbled, garbling.
1.
to confuse unintentionally or ignorantly; jumble:
to garble instructions.
2.
to make unfair or misleading selections from or arrangement of (fact, statements, writings, etc.); distort:
to garble a quotation.
3.
Archaic. to take out the best of.

sounds like I need a better definition of "garble"
 
AFAIK the goal is to enable another party to evaluate a particular function you provide without them learning what the function is.
Though with a single use limitation
 
@EllaRose No, that definition is good. If I get a chance I'll write up an answer to your question.
Garbled circuits are use to implement multiparty computation, a computation that hides the inputs. It can be use for more than 2-party computation, but more efficient constructions exist, so we don't use them for that.
The basic idea is this, for a traditional boolean circuit, AND and OR, there are two inputs and 1 output. For NOT, there is only 1 output. The inputs are 0|1, the outputs are 0|1.
Sorry, I should have said "for a traditional boolean gate". You use these boolean gates to construct a boolean circuit.
Similarly, for garbled circuits, we have garbled gates (AND, OR, NOT). They take the same number of inputs as their boolean counterparts and the same number of outputs (though we can optimize MPC by letting them have multiple outputs).
But, instead of the inputs being 0|1 and the outputs being 0|1, we instead let for each wire the input be one of two long random strings and the output be one of two long random strings. Those inputs and outputs correspond to 0|1, but only the person constructing the gate knows the mapping.
I, knowing the mapping, can construct the truth table.
If the output of one gate is to be an input to another gate, I can use the output long random strings of one gate as the input long random strings of the other gate. I know the mapping there, so I can construct a truth table for that next gate and use long random strings again as the output of that next gate.
Rinse and repeat to construct a large, garbled circuit.
When I get a chance I'll try to find some pictures and write an answer.
Or Yehuda will beat me to it :)
Or take a look at Benny Pinkas talk here titled "Yao's Two-Party Protocol and the BMR Multi-Party Protocol". I haven't watched the video, but the slides look good.
So the video is likely 100X better :)
 
8:13 PM
@EllaRose You made HNQ with your question
 
 
4 hours later…
11:44 PM
@mikeazo Thank you! it sounds very interesting
@CodesInChaos what is HNQ?
oh, hot network questions. Awesome!
holy cow mikeazo, that whole video playlist looks awesome! thanks!
 

« first day (1841 days earlier)      last day (2838 days later) »