Re: [Firebird-devel] Protocol for database encryption callback

2018-04-17 Thread Alex Peshkoff via Firebird-devel
On 04/17/18 16:21, Mark Rotteveel wrote: On 12-4-2018 16:51, Alex Peshkoff via Firebird-devel wrote: There was a bug in v.13 - size of respond buffer was not passed over the wire. Ok, so in V13 one would only need to read the data buffer, and in v14 and higher, one would also need to read p_c

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-17 Thread Mark Rotteveel
On 12-4-2018 16:51, Alex Peshkoff via Firebird-devel wrote: There was a bug in v.13 - size of respond buffer was not passed over the wire. Ok, so in V13 one would only need to read the data buffer, and in v14 and higher, one would also need to read p_cc_reply value? Yes, and if you have v13

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Jiří Činčura
> How does the protocol for the database encryption callback work? If I > look at the implementation in Firebird ADO.net, it just tries and keep > sending the same key in a while loop until Firebird responds with > something other than op_crypt_key_callback, which seems a bit weird. It does. Bu

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Dimitry Sibiryakov
12.04.2018 17:51, Alex Peshkoff via Firebird-devel wrote: Other question: how does this work with named keys? Is it still a responsibility from the server-side plugin to communicate this in a implementation specific way? Yes. A little problem here: when key holder plugin can call callback i

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Alex Peshkoff via Firebird-devel
On 04/12/18 18:20, Mark Rotteveel wrote: On 12-4-2018 16:51, Alex Peshkoff via Firebird-devel wrote: On 04/12/18 16:51, Mark Rotteveel wrote: On 12-4-2018 15:31, Alex Peshkoff via Firebird-devel wrote: On 04/12/18 15:18, Mark Rotteveel wrote: How does the protocol for the database encryption c

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Mark Rotteveel
On 12-4-2018 16:51, Alex Peshkoff via Firebird-devel wrote: On 04/12/18 16:51, Mark Rotteveel wrote: On 12-4-2018 15:31, Alex Peshkoff via Firebird-devel wrote: On 04/12/18 15:18, Mark Rotteveel wrote: How does the protocol for the database encryption callback work? If I look at the implementa

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Dimitry Sibiryakov
12.04.2018 16:51, Alex Peshkoff via Firebird-devel wrote: For example - KeyHolder has a private key of RSA pair, client software - a public one. Before sending something over the wire it's encrypted with public RSA, to decrypt it private part of pair is needed. Servers that do not have right pri

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Alex Peshkoff via Firebird-devel
On 04/12/18 16:51, Mark Rotteveel wrote: On 12-4-2018 15:31, Alex Peshkoff via Firebird-devel wrote: On 04/12/18 15:18, Mark Rotteveel wrote: How does the protocol for the database encryption callback work? If I look at the implementation in Firebird ADO.net, it just tries and keep sending the

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Mark Rotteveel
On 12-4-2018 15:31, Alex Peshkoff via Firebird-devel wrote: On 04/12/18 15:18, Mark Rotteveel wrote: How does the protocol for the database encryption callback work? If I look at the implementation in Firebird ADO.net, it just tries and keep sending the same key in a while loop until Firebird r

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Dimitry Sibiryakov
12.04.2018 15:31, Alex Peshkoff via Firebird-devel wrote: In native API it's provider-specific - after getting an instance of provider one (who needs to use database encryption) should pass callback interface to that provider. Not provider, but dispatcher. You still cannot predict what provid

Re: [Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Alex Peshkoff via Firebird-devel
On 04/12/18 15:18, Mark Rotteveel wrote: How does the protocol for the database encryption callback work? If I look at the implementation in Firebird ADO.net, it just tries and keep sending the same key in a while loop until Firebird responds with something other than op_crypt_key_callback, whi

[Firebird-devel] Protocol for database encryption callback

2018-04-12 Thread Mark Rotteveel
How does the protocol for the database encryption callback work? If I look at the implementation in Firebird ADO.net, it just tries and keep sending the same key in a while loop until Firebird responds with something other than op_crypt_key_callback, which seems a bit weird. So what is in the