How to encrypt a document in the backend for several users?

Hi,

does anybody know how to encrypt a document for several other users using “Public encryption” in the backend with LotusScript ?

The question is a little tricky because I already did many tests and failed to achieve it.

From my tests i already know how to:

  • encrypt the document with “secret key” encryption (This works in the backend as well as for several users/keys but actually I dont want to use “SecretKeys”)

{HowTo: Use the EncryptionKeys-Property and the Encrypt-method of the NotesDocument object}

  • encrypt the document with a “public key” in the backend ONLY for the current user (thats nice, but i really need to add some others as well :())

{HowTo: Use only the Encrypt-method of the NotesDocument object and thats all}

  • encrypt the document with “public keys” for several defined users (YEAH !!!) but unfortunatly only if the document is actually opened in the UI (Noooo !!!)

{HowTo: Simply mark some fields on the form to be encrypted and then create the magic field “PublicEncryptionKeys” where you store all usernames of the people for whom you want to encrypt}

What I really want to do is to create

  1. Create documents that are saved with encrypted fields for SEVERAL users (this could be done with the last method)

  2. Create an background, scheduled agent that checks these documents and if the list of users changes then all of the documents are again reencrypted for the new userlist

Does anybody know how to achieve this.

Thanks in advance for any responses.

Bye

Hynek

PS: I really don’t want to use “Secret encryption” for this because the the admin efford for distributing the keys would be too much

Subject: How to encrypt a document in the backend for several users ?

Search on my name for PublicEncryptionKeys. I have extensive documentation in this forum on how to do it.

Subject: THANKS !!!

Hi Nathan,

thanks a LOT. Thats exactly what I needed.

Adding and then removing the “SecretEncryptionKeys” field is properbly the last thing that i did not try. This should be added to the endless line of “notes thingies” where you can’t do something streightforward but you have to use some dubious workaround. :-))

Again thanks.

Bye

Hynek

PS: And sorry for not searching the forums before posting. Next time I will try better :-))

Subject: How to encrypt a document in the backend for several users ?

Perhaps you could simply use reader-fields on the document.If its only a few fields for the document, move the fields to another document?

Subject: RE: How to encrypt a document in the backend for several users ?

Hi,

sorry but this won’t help. The data has to be encrypted since it should be protected even from in house admins. (Oh yes and they don’t get any copies of user ids to open the encrypted documents)

Nevertheless thanks for the suggestion. :-))

Bye

Hynek

PS: Please don’t start a discussion here how an admin still could get to the data. This won’t really help. Thanks.