Search in sources :

Example 1 with PainlessOpenPgpProvider

use of org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider in project Smack by igniterealtime.

the class OXInstantMessagingManagerTest method test.

@Test
public void test() throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException, SmackException, MissingUserIdOnKeyException, InterruptedException, XMPPException, XmlPullParserException {
    DummyConnection aliceCon = new DummyConnection();
    aliceCon.connect().login();
    DummyConnection bobCon = new DummyConnection();
    bobCon.connect().login();
    FileBasedOpenPgpStore aliceStore = new FileBasedOpenPgpStore(new File(basePath, "alice"));
    FileBasedOpenPgpStore bobStore = new FileBasedOpenPgpStore(new File(basePath, "bob"));
    PainlessOpenPgpProvider aliceProvider = new PainlessOpenPgpProvider(aliceStore);
    PainlessOpenPgpProvider bobProvider = new PainlessOpenPgpProvider(bobStore);
    OpenPgpManager aliceOpenPgp = OpenPgpManager.getInstanceFor(aliceCon);
    OpenPgpManager bobOpenPgp = OpenPgpManager.getInstanceFor(bobCon);
    aliceOpenPgp.setOpenPgpProvider(aliceProvider);
    bobOpenPgp.setOpenPgpProvider(bobProvider);
    OXInstantMessagingManager aliceOxim = OXInstantMessagingManager.getInstanceFor(aliceCon);
    OpenPgpSelf aliceSelf = aliceOpenPgp.getOpenPgpSelf();
    OpenPgpSelf bobSelf = bobOpenPgp.getOpenPgpSelf();
    assertFalse(aliceSelf.hasSecretKeyAvailable());
    assertFalse(bobSelf.hasSecretKeyAvailable());
    // Generate keys
    aliceOpenPgp.generateAndImportKeyPair(aliceSelf.getJid());
    bobOpenPgp.generateAndImportKeyPair(bobSelf.getJid());
    assertTrue(aliceSelf.hasSecretKeyAvailable());
    assertTrue(bobSelf.hasSecretKeyAvailable());
    assertTrue(aliceSelf.isTrusted(aliceSelf.getSigningKeyFingerprint()));
    assertTrue(bobSelf.isTrusted(bobSelf.getSigningKeyFingerprint()));
    assertTrue(aliceSelf.getTrustedFingerprints().contains(aliceSelf.getSigningKeyFingerprint()));
    // Exchange keys
    aliceStore.importPublicKey(bobSelf.getJid(), bobSelf.getAnnouncedPublicKeys().iterator().next());
    bobStore.importPublicKey(aliceSelf.getJid(), aliceSelf.getAnnouncedPublicKeys().iterator().next());
    // Simulate key announcement
    bobStore.setAnnouncedFingerprintsOf(bobSelf.getJid(), Collections.singletonMap(bobSelf.getSigningKeyFingerprint(), new Date()));
    bobStore.setAnnouncedFingerprintsOf(aliceSelf.getJid(), Collections.singletonMap(aliceSelf.getSigningKeyFingerprint(), new Date()));
    aliceStore.setAnnouncedFingerprintsOf(aliceSelf.getJid(), Collections.singletonMap(aliceSelf.getSigningKeyFingerprint(), new Date()));
    aliceStore.setAnnouncedFingerprintsOf(bobSelf.getJid(), Collections.singletonMap(bobSelf.getSigningKeyFingerprint(), new Date()));
    OpenPgpContact aliceForBob = bobOpenPgp.getOpenPgpContact((EntityBareJid) aliceSelf.getJid());
    OpenPgpContact bobForAlice = aliceOpenPgp.getOpenPgpContact((EntityBareJid) bobSelf.getJid());
    assertTrue(aliceForBob.hasUndecidedKeys());
    assertTrue(bobForAlice.hasUndecidedKeys());
    assertTrue(aliceForBob.getUndecidedFingerprints().contains(aliceSelf.getSigningKeyFingerprint()));
    assertTrue(bobForAlice.getUndecidedFingerprints().contains(bobSelf.getSigningKeyFingerprint()));
    bobForAlice.trust(bobSelf.getSigningKeyFingerprint());
    aliceForBob.trust(aliceSelf.getSigningKeyFingerprint());
    assertFalse(aliceForBob.hasUndecidedKeys());
    assertFalse(bobForAlice.hasUndecidedKeys());
    MessageBuilder messageBuilder = StanzaBuilder.buildMessage();
    assertFalse(ExplicitMessageEncryptionElement.hasProtocol(messageBuilder.build(), ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol.openpgpV0));
    aliceOxim.addOxMessage(messageBuilder, bobForAlice, Collections.singletonList(new Message.Body(null, "Hello World!")));
    Message message = messageBuilder.build();
    assertTrue(ExplicitMessageEncryptionElement.hasProtocol(message, ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol.openpgpV0));
    assertNotNull(OpenPgpElement.fromStanza(message));
    OpenPgpMessage decrypted = bobOpenPgp.decryptOpenPgpElement(OpenPgpElement.fromStanza(message), aliceForBob);
    assertEquals(OpenPgpMessage.State.signcrypt, decrypted.getState());
    SigncryptElement signcryptElement = (SigncryptElement) decrypted.getOpenPgpContentElement();
    Message.Body body = signcryptElement.getExtension(Message.Body.ELEMENT, Message.Body.NAMESPACE);
    assertNotNull(body);
    assertEquals("Hello World!", body.getMessage());
    OpenPgpMetadata metadata = decrypted.getMetadata();
    assertTrue(metadata.isSigned() && metadata.isEncrypted());
    // Check, if one of Bobs keys was used for decryption
    assertNotNull(bobSelf.getSigningKeyRing().getPublicKey(metadata.getDecryptionKey().getKeyId()));
    // TODO: I observed this assertTrue() to fail sporadically. As a first attempt to diagnose this, a message was
    // added to the assertion. However since most (all?) objects used in the message do not implement a proper
    // toString() this is probably not really helpful as it is.
    PGPPublicKeyRingCollection pubKeys = aliceForBob.getTrustedAnnouncedKeys();
    // Check if one of Alice' keys was used for signing
    assertTrue(metadata.containsVerifiedSignatureFrom(pubKeys.iterator().next()), metadata + " did not contain one of alice' keys " + pubKeys);
}
Also used : SigncryptElement(org.jivesoftware.smackx.ox.element.SigncryptElement) OpenPgpMessage(org.jivesoftware.smackx.ox.OpenPgpMessage) Message(org.jivesoftware.smack.packet.Message) DummyConnection(org.jivesoftware.smack.DummyConnection) OpenPgpSelf(org.jivesoftware.smackx.ox.OpenPgpSelf) Date(java.util.Date) FileBasedOpenPgpStore(org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore) PGPPublicKeyRingCollection(org.bouncycastle.openpgp.PGPPublicKeyRingCollection) MessageBuilder(org.jivesoftware.smack.packet.MessageBuilder) OpenPgpMessage(org.jivesoftware.smackx.ox.OpenPgpMessage) File(java.io.File) PainlessOpenPgpProvider(org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider) OpenPgpManager(org.jivesoftware.smackx.ox.OpenPgpManager) OpenPgpContact(org.jivesoftware.smackx.ox.OpenPgpContact) OpenPgpMetadata(org.pgpainless.decryption_verification.OpenPgpMetadata) Test(org.junit.jupiter.api.Test)

Example 2 with PainlessOpenPgpProvider

use of org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider in project Smack by igniterealtime.

the class OXSecretKeyBackupIntegrationTest method test.

@SmackIntegrationTest
public void test() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException, IOException, InterruptedException, PubSubException.NotALeafNodeException, SmackException.NoResponseException, SmackException.NotConnectedException, XMPPException.XMPPErrorException, SmackException.NotLoggedInException, SmackException.FeatureNotSupportedException, MissingUserIdOnKeyException, NoBackupFoundException, InvalidBackupCodeException, PGPException, MissingOpenPgpKeyException {
    OpenPgpStore beforeStore = new FileBasedOpenPgpStore(beforePath);
    beforeStore.setKeyRingProtector(new UnprotectedKeysProtector());
    PainlessOpenPgpProvider beforeProvider = new PainlessOpenPgpProvider(beforeStore);
    OpenPgpManager openPgpManager = OpenPgpManager.getInstanceFor(aliceConnection);
    openPgpManager.setOpenPgpProvider(beforeProvider);
    OpenPgpSelf self = openPgpManager.getOpenPgpSelf();
    assertNull(self.getSigningKeyFingerprint());
    OpenPgpV4Fingerprint keyFingerprint = openPgpManager.generateAndImportKeyPair(alice);
    assertEquals(keyFingerprint, self.getSigningKeyFingerprint());
    assertTrue(self.getSecretKeys().contains(keyFingerprint.getKeyId()));
    PGPSecretKeyRing beforeSec = beforeStore.getSecretKeyRing(alice, keyFingerprint);
    assertNotNull(beforeSec);
    PGPPublicKeyRing beforePub = beforeStore.getPublicKeyRing(alice, keyFingerprint);
    assertNotNull(beforePub);
    OpenPgpSecretKeyBackupPassphrase backupPassphrase = openPgpManager.backupSecretKeyToServer(availableSecretKeys -> availableSecretKeys);
    FileBasedOpenPgpStore afterStore = new FileBasedOpenPgpStore(afterPath);
    afterStore.setKeyRingProtector(new UnprotectedKeysProtector());
    PainlessOpenPgpProvider afterProvider = new PainlessOpenPgpProvider(afterStore);
    openPgpManager.setOpenPgpProvider(afterProvider);
    OpenPgpV4Fingerprint fingerprint = openPgpManager.restoreSecretKeyServerBackup(() -> backupPassphrase);
    assertEquals(keyFingerprint, fingerprint);
    assertTrue(self.getSecretKeys().contains(keyFingerprint.getKeyId()));
    assertEquals(keyFingerprint, self.getSigningKeyFingerprint());
    PGPSecretKeyRing afterSec = afterStore.getSecretKeyRing(alice, keyFingerprint);
    assertNotNull(afterSec);
    assertArrayEquals(beforeSec.getEncoded(), afterSec.getEncoded());
    PGPPublicKeyRing afterPub = afterStore.getPublicKeyRing(alice, keyFingerprint);
    assertNotNull(afterPub);
    assertArrayEquals(beforePub.getEncoded(), afterPub.getEncoded());
}
Also used : PGPPublicKeyRing(org.bouncycastle.openpgp.PGPPublicKeyRing) FileBasedOpenPgpStore(org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore) UnprotectedKeysProtector(org.pgpainless.key.protection.UnprotectedKeysProtector) FileBasedOpenPgpStore(org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore) OpenPgpStore(org.jivesoftware.smackx.ox.store.definition.OpenPgpStore) OpenPgpV4Fingerprint(org.pgpainless.key.OpenPgpV4Fingerprint) PGPSecretKeyRing(org.bouncycastle.openpgp.PGPSecretKeyRing) PainlessOpenPgpProvider(org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider) SmackIntegrationTest(org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest)

Example 3 with PainlessOpenPgpProvider

use of org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider in project Smack by igniterealtime.

the class OXInstantMessagingIntegrationTest method basicInstantMessagingTest.

@SmackIntegrationTest
public void basicInstantMessagingTest() throws Exception {
    final SimpleResultSyncPoint bobReceivedMessage = new SimpleResultSyncPoint();
    final String body = "Writing integration tests is an annoying task, but it has to be done, so lets do it!!!";
    FileBasedOpenPgpStore aliceStore = new FileBasedOpenPgpStore(aliceStorePath);
    aliceStore.setKeyRingProtector(new UnprotectedKeysProtector());
    FileBasedOpenPgpStore bobStore = new FileBasedOpenPgpStore(bobStorePath);
    bobStore.setKeyRingProtector(new UnprotectedKeysProtector());
    PainlessOpenPgpProvider aliceProvider = new PainlessOpenPgpProvider(aliceStore);
    PainlessOpenPgpProvider bobProvider = new PainlessOpenPgpProvider(bobStore);
    aliceOpenPgp = OpenPgpManager.getInstanceFor(aliceConnection);
    bobOpenPgp = OpenPgpManager.getInstanceFor(bobConnection);
    OXInstantMessagingManager aliceInstantMessaging = OXInstantMessagingManager.getInstanceFor(aliceConnection);
    OXInstantMessagingManager bobInstantMessaging = OXInstantMessagingManager.getInstanceFor(bobConnection);
    bobInstantMessaging.addOxMessageListener(new OxMessageListener() {

        @Override
        public void newIncomingOxMessage(OpenPgpContact contact, Message originalMessage, SigncryptElement decryptedPayload, OpenPgpMetadata metadata) {
            if (((Message.Body) decryptedPayload.getExtension(Message.Body.NAMESPACE)).getMessage().equals(body)) {
                bobReceivedMessage.signal();
            } else {
                bobReceivedMessage.signalFailure();
            }
        }
    });
    aliceOpenPgp.setOpenPgpProvider(aliceProvider);
    bobOpenPgp.setOpenPgpProvider(bobProvider);
    aliceFingerprint = aliceOpenPgp.generateAndImportKeyPair(alice);
    bobFingerprint = bobOpenPgp.generateAndImportKeyPair(bob);
    aliceOpenPgp.announceSupportAndPublish();
    bobOpenPgp.announceSupportAndPublish();
    OpenPgpContact bobForAlice = aliceOpenPgp.getOpenPgpContact(bob.asEntityBareJidIfPossible());
    OpenPgpContact aliceForBob = bobOpenPgp.getOpenPgpContact(alice.asEntityBareJidIfPossible());
    bobForAlice.updateKeys(aliceConnection);
    assertFalse(bobForAlice.isTrusted(bobFingerprint));
    assertFalse(aliceForBob.isTrusted(aliceFingerprint));
    bobForAlice.trust(bobFingerprint);
    aliceForBob.trust(aliceFingerprint);
    assertTrue(bobForAlice.isTrusted(bobFingerprint));
    assertTrue(aliceForBob.isTrusted(aliceFingerprint));
    aliceInstantMessaging.sendOxMessage(bobForAlice, body);
    bobReceivedMessage.waitForResult(timeout);
}
Also used : SigncryptElement(org.jivesoftware.smackx.ox.element.SigncryptElement) Message(org.jivesoftware.smack.packet.Message) FileBasedOpenPgpStore(org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore) UnprotectedKeysProtector(org.pgpainless.key.protection.UnprotectedKeysProtector) SimpleResultSyncPoint(org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint) PainlessOpenPgpProvider(org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider) OpenPgpContact(org.jivesoftware.smackx.ox.OpenPgpContact) OpenPgpMetadata(org.pgpainless.decryption_verification.OpenPgpMetadata) SmackIntegrationTest(org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest)

Example 4 with PainlessOpenPgpProvider

use of org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider in project Smack by igniterealtime.

the class SecretKeyBackupHelperTest method createAndDecryptSecretKeyElementTest.

@Test
public void createAndDecryptSecretKeyElementTest() throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException, MissingUserIdOnKeyException, MissingOpenPgpKeyException, InvalidBackupCodeException {
    // Prepare store and provider and so on...
    FileBasedOpenPgpStore store = new FileBasedOpenPgpStore(basePath);
    PainlessOpenPgpProvider provider = new PainlessOpenPgpProvider(store);
    // Generate and import key
    PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing().simpleEcKeyRing("xmpp:alice@wonderland.lit");
    BareJid jid = JidCreate.bareFrom("alice@wonderland.lit");
    provider.getStore().importSecretKey(jid, secretKeys);
    // Create encrypted backup
    OpenPgpSecretKeyBackupPassphrase backupCode = SecretKeyBackupHelper.generateBackupPassword();
    SecretkeyElement element = SecretKeyBackupHelper.createSecretkeyElement(provider, jid, Collections.singleton(new OpenPgpV4Fingerprint(secretKeys)), backupCode);
    // Decrypt backup and compare
    PGPSecretKeyRing secretKeyRing = SecretKeyBackupHelper.restoreSecretKeyBackup(element, backupCode);
    Assertions.assertArrayEquals(secretKeys.getEncoded(), secretKeyRing.getEncoded());
}
Also used : SecretkeyElement(org.jivesoftware.smackx.ox.element.SecretkeyElement) FileBasedOpenPgpStore(org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore) BareJid(org.jxmpp.jid.BareJid) OpenPgpV4Fingerprint(org.pgpainless.key.OpenPgpV4Fingerprint) PGPSecretKeyRing(org.bouncycastle.openpgp.PGPSecretKeyRing) PainlessOpenPgpProvider(org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider) Test(org.junit.jupiter.api.Test)

Example 5 with PainlessOpenPgpProvider

use of org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider in project Smack by igniterealtime.

the class PainlessOpenPgpProviderTest method encryptDecryptTest.

@Test
public void encryptDecryptTest() throws PGPException, NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException, IOException, MissingUserIdOnKeyException, XmlPullParserException {
    // Initialize
    OpenPgpStore aliceStore = new FileBasedOpenPgpStore(storagePath);
    OpenPgpStore bobStore = new FileBasedOpenPgpStore(storagePath);
    aliceStore.setKeyRingProtector(new UnprotectedKeysProtector());
    bobStore.setKeyRingProtector(new UnprotectedKeysProtector());
    XMPPConnection bobConnection = new DummyConnection();
    PainlessOpenPgpProvider aliceProvider = new PainlessOpenPgpProvider(aliceStore);
    PainlessOpenPgpProvider bobProvider = new PainlessOpenPgpProvider(bobStore);
    PGPSecretKeyRing aliceKeys = aliceStore.generateKeyRing(alice);
    PGPSecretKeyRing bobKeys = bobStore.generateKeyRing(bob);
    PGPPublicKeyRing alicePubKeys = KeyRingUtils.publicKeyRingFrom(aliceKeys);
    PGPPublicKeyRing bobPubKeys = KeyRingUtils.publicKeyRingFrom(bobKeys);
    OpenPgpV4Fingerprint aliceFingerprint = new OpenPgpV4Fingerprint(aliceKeys);
    OpenPgpV4Fingerprint bobFingerprint = new OpenPgpV4Fingerprint(bobKeys);
    aliceStore.importSecretKey(alice, aliceKeys);
    bobStore.importSecretKey(bob, bobKeys);
    aliceStore.setAnnouncedFingerprintsOf(alice, Collections.singletonMap(aliceFingerprint, new Date()));
    bobStore.setAnnouncedFingerprintsOf(bob, Collections.singletonMap(bobFingerprint, new Date()));
    OpenPgpSelf aliceSelf = new OpenPgpSelf(alice, aliceStore);
    aliceSelf.trust(aliceFingerprint);
    OpenPgpSelf bobSelf = new OpenPgpSelf(bob, bobStore);
    bobSelf.trust(bobFingerprint);
    // Exchange keys
    aliceStore.importPublicKey(bob, bobPubKeys);
    bobStore.importPublicKey(alice, alicePubKeys);
    aliceStore.setAnnouncedFingerprintsOf(bob, Collections.singletonMap(bobFingerprint, new Date()));
    bobStore.setAnnouncedFingerprintsOf(alice, Collections.singletonMap(aliceFingerprint, new Date()));
    OpenPgpContact aliceForBob = new OpenPgpContact(alice, bobStore);
    aliceForBob.trust(aliceFingerprint);
    OpenPgpContact bobForAlice = new OpenPgpContact(bob, aliceStore);
    bobForAlice.trust(bobFingerprint);
    // Prepare message
    Message.Body body = new Message.Body(null, "Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
    List<ExtensionElement> payload = Collections.singletonList(body);
    OpenPgpElementAndMetadata encrypted;
    OpenPgpMessage decrypted;
    /*
        test signcrypt
         */
    SigncryptElement signcryptElement = new SigncryptElement(Collections.<Jid>singleton(bob), payload);
    // Encrypt and Sign
    encrypted = aliceProvider.signAndEncrypt(signcryptElement, aliceSelf, Collections.singleton(bobForAlice));
    // Decrypt and Verify
    decrypted = bobProvider.decryptAndOrVerify(bobConnection, encrypted.getElement(), bobSelf, aliceForBob);
    OpenPgpFingerprint decryptionFingerprint = decrypted.getMetadata().getDecryptionKey().getFingerprint();
    assertTrue(bobSelf.getSecretKeys().contains(decryptionFingerprint.getKeyId()));
    assertTrue(decrypted.getMetadata().containsVerifiedSignatureFrom(alicePubKeys));
    assertEquals(OpenPgpMessage.State.signcrypt, decrypted.getState());
    SigncryptElement decryptedSignCrypt = (SigncryptElement) decrypted.getOpenPgpContentElement();
    assertEquals(body.getMessage(), decryptedSignCrypt.<Message.Body>getExtension(Message.Body.ELEMENT, Message.Body.NAMESPACE).getMessage());
    /*
        test crypt
         */
    CryptElement cryptElement = new CryptElement(Collections.<Jid>singleton(bob), payload);
    // Encrypt
    encrypted = aliceProvider.encrypt(cryptElement, aliceSelf, Collections.singleton(bobForAlice));
    decrypted = bobProvider.decryptAndOrVerify(bobConnection, encrypted.getElement(), bobSelf, aliceForBob);
    decryptionFingerprint = decrypted.getMetadata().getDecryptionKey().getFingerprint();
    assertTrue(bobSelf.getSecretKeys().contains(decryptionFingerprint.getKeyId()));
    assertTrue(decrypted.getMetadata().getVerifiedSignatures().isEmpty());
    assertEquals(OpenPgpMessage.State.crypt, decrypted.getState());
    CryptElement decryptedCrypt = (CryptElement) decrypted.getOpenPgpContentElement();
    assertEquals(body.getMessage(), decryptedCrypt.<Message.Body>getExtension(Message.Body.ELEMENT, Message.Body.NAMESPACE).getMessage());
    /*
        test sign
         */
    SignElement signElement = new SignElement(Collections.singleton(bob), new Date(), payload);
    // Sign
    encrypted = aliceProvider.sign(signElement, aliceSelf);
    decrypted = bobProvider.decryptAndOrVerify(bobConnection, encrypted.getElement(), bobSelf, aliceForBob);
    assertNull(decrypted.getMetadata().getDecryptionKey());
    assertTrue(decrypted.getMetadata().containsVerifiedSignatureFrom(alicePubKeys));
    assertEquals(OpenPgpMessage.State.sign, decrypted.getState());
    SignElement decryptedSign = (SignElement) decrypted.getOpenPgpContentElement();
    assertEquals(body.getMessage(), decryptedSign.<Message.Body>getExtension(Message.Body.ELEMENT, Message.Body.NAMESPACE).getMessage());
}
Also used : PGPPublicKeyRing(org.bouncycastle.openpgp.PGPPublicKeyRing) SigncryptElement(org.jivesoftware.smackx.ox.element.SigncryptElement) Message(org.jivesoftware.smack.packet.Message) DummyConnection(org.jivesoftware.smack.DummyConnection) ExtensionElement(org.jivesoftware.smack.packet.ExtensionElement) XMPPConnection(org.jivesoftware.smack.XMPPConnection) Date(java.util.Date) CryptElement(org.jivesoftware.smackx.ox.element.CryptElement) OpenPgpElementAndMetadata(org.jivesoftware.smackx.ox.crypto.OpenPgpElementAndMetadata) FileBasedOpenPgpStore(org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore) UnprotectedKeysProtector(org.pgpainless.key.protection.UnprotectedKeysProtector) SignElement(org.jivesoftware.smackx.ox.element.SignElement) FileBasedOpenPgpStore(org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore) OpenPgpStore(org.jivesoftware.smackx.ox.store.definition.OpenPgpStore) OpenPgpV4Fingerprint(org.pgpainless.key.OpenPgpV4Fingerprint) OpenPgpFingerprint(org.pgpainless.key.OpenPgpFingerprint) PGPSecretKeyRing(org.bouncycastle.openpgp.PGPSecretKeyRing) PainlessOpenPgpProvider(org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider) Test(org.junit.jupiter.api.Test)

Aggregations

PainlessOpenPgpProvider (org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider)5 FileBasedOpenPgpStore (org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpStore)5 PGPSecretKeyRing (org.bouncycastle.openpgp.PGPSecretKeyRing)3 Message (org.jivesoftware.smack.packet.Message)3 SigncryptElement (org.jivesoftware.smackx.ox.element.SigncryptElement)3 Test (org.junit.jupiter.api.Test)3 OpenPgpV4Fingerprint (org.pgpainless.key.OpenPgpV4Fingerprint)3 UnprotectedKeysProtector (org.pgpainless.key.protection.UnprotectedKeysProtector)3 Date (java.util.Date)2 PGPPublicKeyRing (org.bouncycastle.openpgp.PGPPublicKeyRing)2 SmackIntegrationTest (org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest)2 DummyConnection (org.jivesoftware.smack.DummyConnection)2 OpenPgpContact (org.jivesoftware.smackx.ox.OpenPgpContact)2 OpenPgpStore (org.jivesoftware.smackx.ox.store.definition.OpenPgpStore)2 OpenPgpMetadata (org.pgpainless.decryption_verification.OpenPgpMetadata)2 File (java.io.File)1 PGPPublicKeyRingCollection (org.bouncycastle.openpgp.PGPPublicKeyRingCollection)1 SimpleResultSyncPoint (org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint)1 XMPPConnection (org.jivesoftware.smack.XMPPConnection)1 ExtensionElement (org.jivesoftware.smack.packet.ExtensionElement)1