need this fix urgently

66 views
Skip to first unread message

Anurag Shrinagar

unread,
Aug 11, 2015, 12:01:26 PM8/11/15
to Keyczar Discuss
Hi,

Can someone pick this bug asap?


I really need its fix urgently.

Thanks,
Anurag

Steve Weis

unread,
Aug 11, 2015, 12:20:57 PM8/11/15
to Keyczar Discuss
Are you using Java 1.5? I just cloned the latest repo as a Maven project in Eclipse and it was complaining about the "@Override" annotations. In Java 1.5, I think you can't use the @Override on methods implementing interfaces.

Try building with a later version of Java. That fixed the problem for me.

The Maven pom.xml file seems to specify Java 1.5, which probably caused Eclipse to configure the project to use that version.

--
You received this message because you are subscribed to the Google Groups "Keyczar Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keyczar-discu...@googlegroups.com.
To post to this group, send email to keyczar...@googlegroups.com.
Visit this group at http://groups.google.com/group/keyczar-discuss.
For more options, visit https://groups.google.com/d/optout.

Anurag Shrinagar

unread,
Aug 12, 2015, 10:36:24 AM8/12/15
to Keyczar Discuss
Thanks for looking into the issue. It worked for me as well. 

But, I am facing problems further. I don't want to keep my key open in the file system. I want to keep it password protected in a Keystore (java.security.KeyStore). Then, I want to read it in memory. I want to get my key from Keystore in memory only. I will be keeping my Keystore and password on file system. For this, I was trying to implement EncryptedReader functions. I used AesKey and KeyMetadata class constructors to build my key and meta data file. These, I used in implementing functions of EncryptedReader. But I am still facing errors. Right now, I am at this error :

Exception in thread "main" org.keyczar.exceptions.NoPrimaryKeyException: No primary key found
at org.keyczar.Encrypter.ciphertextSize(Encrypter.java:89)
at org.keyczar.Encrypter.encrypt(Encrypter.java:110)
at org.keyczar.Encrypter.encrypt(Encrypter.java:182)
at test.main(test.java:31)

I have seen almost all the classes in this API, but it doesn't sound like that I can work without keeping key in file system. Is there anyway that I could save myself from keeping key in file system?

PS: I am looking for AES encryption.

Steve Weis

unread,
Aug 12, 2015, 12:40:33 PM8/12/15
to Keyczar Discuss
tl;dr: Make one of your keys have a "primary" key status.

In Keyczar, a "Primary" key is used to encrypt or sign new data. To encrypt, there must be a primary key in the key set: https://github.com/google/keyczar/wiki/KeyStatus

My guess is your key set only has "active" keys, which can only be used to decrypt or verify data. The idea is that a key will start out as primary, then later demoted to "active" so you still have it to decrypt old ciphertext.

KeyczarTool has a "promote" and "demote" operation for doing this:
Reply all
Reply to author
Forward
0 new messages