You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Couchdb Couchdb <xc...@googlemail.com> on 2011/07/07 11:08:47 UTC

Views problem, encryption

Hi all,

i am working on the couchdb aes encryption and have changed two functions in
couch_file.erl(also added new functions)
I have changed: append_binary_md5/2 and pread_iolist/2, so data is beeing
encrypted by writing and decrypted by reading(i get the passwort from
smartcard). Saving and reading docs is successfull
So now i have problems with views, the couchdb craches.
I have tried to debug, but i cant find the source of bug. The data encrypted
and decrypted by append_binary_md5, pread_iolist is completely(successfully
en- and de-crypted)
What is the reason ? Blocksizes ? I think the views should not know how the
couch_file works, while the output is proper

Thanks

Maxim L.

Re: Views problem, encryption

Posted by Robert Newson <rn...@apache.org>.
You can publish the code to github and then post a link here ;)

>From memory, I don't think it's quite as simple as changing
couch_file. We write in blocks and reserve a bit of each block to
indicate whether we're inside an attachment or not (to prevent us
accidentally reading a couchdb database stored in an attachment). That
plus the padding you'd need for a block cipher could explain your
difficulty.

B.

On 7 July 2011 10:43, Couchdb Couchdb <xc...@googlemail.com> wrote:
> The trace:
> reserved slot index out of range
> [error] [<0.625.0>] OS Process Error <0.32695.0> :: {os_process_error,
>                                                     {exit_status,1}}
>
> reserved slot index out of range
> [error] [<0.625.0>] OS Process Error <0.32689.0> :: {os_process_error,
>                                                     {exit_status,1}}
> reserved slot index out of range
> [error] [<0.625.0>] OS Process Error <0.32692.0> :: {os_process_error,
>                                                     {exit_status,1}}
>
> I can publish the code, but the server denies the mail
>
> 2011/7/7 Couchdb Couchdb <xc...@googlemail.com>
>
>> Just run ./compile.sh script, to compile in debug modus(but change the
>> paths)
>>
>>
>> 2011/7/7 Couchdb Couchdb <xc...@googlemail.com>
>>
>>> Here the trace:
>>>
>>> reserved slot index out of range
>>> [error] [<0.625.0>] OS Process Error <0.32674.0> :: {os_process_error,
>>>                                                      {exit_status,1}}
>>> reserved slot index out of range
>>> [error] [<0.625.0>] OS Process Error <0.32680.0> :: {os_process_error,
>>>                                                      {exit_status,1}}
>>> ...
>>>
>>> Encryption of couchdb is my bachelor thesis and also the organization is
>>> interested in.
>>>
>>>
>>>
>>>
>>> 2011/7/7 Jason Smith <jh...@iriscouch.com>
>>>
>>>>
>>>> That is very interesting!
>>>>
>>>> It sounds like perhaps you are implementing encryption to meet a
>>>> regulatory or other policy requirement.
>>>>
>>>> Obviously you have experience so I assume you have ruled out
>>>> alternatives, such as running CouchDB on an encrypted filesystem?
>>>>
>>>> I wonder if it is possible for you to publish your work-in-progress?
>>>> That will enable many people to help you investigate. If it is not
>>>> possible, no doubt the community will do its best. (I see Benoit
>>>> already sent a reply.)
>>>>
>>>> --
>>>> Iris Couch
>>>>
>>>
>>>
>>
>

Re: Views problem, encryption

Posted by Couchdb Couchdb <xc...@googlemail.com>.
The trace:
reserved slot index out of range
[error] [<0.625.0>] OS Process Error <0.32695.0> :: {os_process_error,
                                                     {exit_status,1}}

reserved slot index out of range
[error] [<0.625.0>] OS Process Error <0.32689.0> :: {os_process_error,
                                                     {exit_status,1}}
reserved slot index out of range
[error] [<0.625.0>] OS Process Error <0.32692.0> :: {os_process_error,
                                                     {exit_status,1}}

I can publish the code, but the server denies the mail

2011/7/7 Couchdb Couchdb <xc...@googlemail.com>

> Just run ./compile.sh script, to compile in debug modus(but change the
> paths)
>
>
> 2011/7/7 Couchdb Couchdb <xc...@googlemail.com>
>
>> Here the trace:
>>
>> reserved slot index out of range
>> [error] [<0.625.0>] OS Process Error <0.32674.0> :: {os_process_error,
>>                                                      {exit_status,1}}
>> reserved slot index out of range
>> [error] [<0.625.0>] OS Process Error <0.32680.0> :: {os_process_error,
>>                                                      {exit_status,1}}
>> ...
>>
>> Encryption of couchdb is my bachelor thesis and also the organization is
>> interested in.
>>
>>
>>
>>
>> 2011/7/7 Jason Smith <jh...@iriscouch.com>
>>
>>>
>>> That is very interesting!
>>>
>>> It sounds like perhaps you are implementing encryption to meet a
>>> regulatory or other policy requirement.
>>>
>>> Obviously you have experience so I assume you have ruled out
>>> alternatives, such as running CouchDB on an encrypted filesystem?
>>>
>>> I wonder if it is possible for you to publish your work-in-progress?
>>> That will enable many people to help you investigate. If it is not
>>> possible, no doubt the community will do its best. (I see Benoit
>>> already sent a reply.)
>>>
>>> --
>>> Iris Couch
>>>
>>
>>
>

Re: Views problem, encryption

Posted by Couchdb Couchdb <xc...@googlemail.com>.
Just run ./compile.sh script, to compile in debug modus(but change the
paths)

2011/7/7 Couchdb Couchdb <xc...@googlemail.com>

> Here the trace:
>
> reserved slot index out of range
> [error] [<0.625.0>] OS Process Error <0.32674.0> :: {os_process_error,
>                                                      {exit_status,1}}
> reserved slot index out of range
> [error] [<0.625.0>] OS Process Error <0.32680.0> :: {os_process_error,
>                                                      {exit_status,1}}
> ...
>
> Encryption of couchdb is my bachelor thesis and also the organization is
> interested in.
>
>
>
>
> 2011/7/7 Jason Smith <jh...@iriscouch.com>
>
>>
>> That is very interesting!
>>
>> It sounds like perhaps you are implementing encryption to meet a
>> regulatory or other policy requirement.
>>
>> Obviously you have experience so I assume you have ruled out
>> alternatives, such as running CouchDB on an encrypted filesystem?
>>
>> I wonder if it is possible for you to publish your work-in-progress?
>> That will enable many people to help you investigate. If it is not
>> possible, no doubt the community will do its best. (I see Benoit
>> already sent a reply.)
>>
>> --
>> Iris Couch
>>
>
>

Re: Views problem, encryption

Posted by Jason Smith <jh...@iriscouch.com>.
On Thu, Jul 7, 2011 at 4:08 PM, Couchdb Couchdb <xc...@googlemail.com> wrote:
> Hi all,
>
> i am working on the couchdb aes encryption and have changed two functions in

That is very interesting!

It sounds like perhaps you are implementing encryption to meet a
regulatory or other policy requirement.

Obviously you have experience so I assume you have ruled out
alternatives, such as running CouchDB on an encrypted filesystem?

I wonder if it is possible for you to publish your work-in-progress?
That will enable many people to help you investigate. If it is not
possible, no doubt the community will do its best. (I see Benoit
already sent a reply.)

-- 
Iris Couch

Re: Views problem, encryption

Posted by Benoit Chesneau <bc...@gmail.com>.
On Thu, Jul 7, 2011 at 11:08 AM, Couchdb Couchdb
<xc...@googlemail.com> wrote:
> Hi all,
>
> i am working on the couchdb aes encryption and have changed two functions in
> couch_file.erl(also added new functions)
> I have changed: append_binary_md5/2 and pread_iolist/2, so data is beeing
> encrypted by writing and decrypted by reading(i get the passwort from
> smartcard). Saving and reading docs is successfull
> So now i have problems with views, the couchdb craches.
> I have tried to debug, but i cant find the source of bug. The data encrypted
> and decrypted by append_binary_md5, pread_iolist is completely(successfully
> en- and de-crypted)
> What is the reason ? Blocksizes ? I think the views should not know how the
> couch_file works, while the output is proper
>
> Thanks
>
> Maxim L.
>

any trace/code around ?

- benoît