Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is using a TCCR hash with random OT KOS safe? #25

Open
themighty1 opened this issue Aug 2, 2023 · 6 comments
Open

is using a TCCR hash with random OT KOS safe? #25

themighty1 opened this issue Aug 2, 2023 · 6 comments

Comments

@themighty1
Copy link

Hi, ocelot currently uses a TCCR hash for breaking correlations after the KOS check acc.to this line

let y0 = self.ot.hash.tccr_hash(Block::from(j as u128), q) ^ input.0;

However, the security proof of the KOS paper uses a random oracle.

Since we are also implemting a KOS OT extension, we're trying to understand has there been any recent work which proves KOS security with a TCCR hash? Or is this a liberty that ocelot is taking without relying on a formal proof?

Thanks.

@jprider63
Copy link

Hi @themighty1. The person familiar with this code is currently out, but they'll get back to you once they return.

@Isweet
Copy link
Contributor

Isweet commented Aug 15, 2023

The paper that the current TCCR implementation is based on is: https://eprint.iacr.org/2019/074.pdf.

See: https://github.com/GaloisInc/swanky/blob/master/scuttlebutt/src/hash_aes.rs#L52

There's been some research since that suggests that a TCCR with tighter concrete security is necessary, see: https://eprint.iacr.org/2019/1168.pdf.

Does that help?

@themighty1
Copy link
Author

Hi, thank you for the response and the link. Sry, I did not originally specify that I had random OT KOS in mind.

Indeed, the GKWY19 paper shows that a tcr hash can be used with KOS15's standart OT. GKWY19 does not show that tcr is ok for KOS15 random OT. (we go from random OT to standard OT by performing derandomization as per Fig.9 of the KOS15 paper).

But in ocelot, a tcr hash is used directly for random OT here:

let x0 = self.ot.hash.tccr_hash(Block::from(j as u128), q);

I was trying to better understand if maybe I was misunderstanding something or there was some other work I missed. I would appreciate you sharing your thoughts on this, @Isweet .

@themighty1 themighty1 changed the title is using a TCCR hash with KOS safe? is using a TCCR hash with random OT KOS safe? Aug 23, 2023
@amaloz
Copy link
Collaborator

amaloz commented Aug 23, 2023

Looking through the implementation (in kos.rs) and Figure 7 in GKWY19, it does appear that the random OT implementation matches the protocol proven secure using tcr in the paper (Theorem 7 in the Appendix). I'm not sure if this is equivalent to KOS15 random OT as specified in their paper though.

When you say:

GKWY19 does not show that tcr is ok for KOS15 random OT.

Are you referring to Table 2 or somewhere else in the paper where they make that explicit? I may have missed that.

@themighty1
Copy link
Author

Are you referring to Table 2 or somewhere else in the paper where they make that explicit? I may have missed that.

Thanks for pointing that out.
Yes, I was simply looking at Table 2 and assumed that since random OT KOS is not explicitely mentioned in Table 2, then it must be that the paper does not prove that tcr can be used with random OT KOS.
However, looking at Appendix A, I do agree that it seems like there is a proof that using a tcr hash is indeed secure.

@ladnir
Copy link

ladnir commented Sep 14, 2023

FYI, here's Lance's and my take on this question osu-crypto/libOTe#116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants