Ejemplo n.º 1
0
            public EKEAlice(TheBallEKE ekeContext, bool isAsync = false)
            {
                EKEContext    = ekeContext;
                AlicesActions = new NegotiationAction[]
                {
                    Alice1_1_GenerateKeyPair, Alice1_2_EncryptPublicKeyWithS, Alice1_3_SendEncryptedPublicKeyToBob,

                    Alice3_0_GetEncryptedSessionKeyFromBob, Alice3_1_DecryptSessionKey,
                    Alice3_2_GenerateAliceRandomValue,
                    Alice3_3_EncryptAliceRandomValueWithSessionKey, Alice3_4_SendEncryptedAliceRandomToBob,

                    Alice5_0_GetAlicesRandomWithBobsRandomEncryptedFromBob, Alice5_1_DecryptBothRandoms,
                    Alice5_2_VerifyAliceRandomInCombinedRandom,
                    Alice5_3_ExtractBobsRandom, Alice5_4_EncryptBobsRandom, Alice5_5_SendEncryptedBobsRandomToBob,

                    AliceX_DoneWithEKE
                };
                AlicesActionsAsync = new NegotiationActionAsync[]
                {
                    Alice1_1_GenerateKeyPairAsync, Alice1_2_EncryptPublicKeyWithSAsync, Alice1_3_SendEncryptedPublicKeyToBobAsync,

                    Alice3_0_GetEncryptedSessionKeyFromBobAsync, Alice3_1_DecryptSessionKeyAsync,
                    Alice3_2_GenerateAliceRandomValueAsync,
                    Alice3_3_EncryptAliceRandomValueWithSessionKeyAsync, Alice3_4_SendEncryptedAliceRandomToBobAsync,

                    Alice5_0_GetAlicesRandomWithBobsRandomEncryptedFromBobAsync, Alice5_1_DecryptBothRandomsAsync,
                    Alice5_2_VerifyAliceRandomInCombinedRandomAsync,
                    Alice5_3_ExtractBobsRandomAsync, Alice5_4_EncryptBobsRandomAsync, Alice5_5_SendEncryptedBobsRandomToBobAsync,

                    AliceX_DoneWithEKEAsync
                };
                CurrentActionIndex = 0;
                WaitForOtherParty  = false;
                IsAsync            = isAsync;
            }
Ejemplo n.º 2
0
            public EKEAlice(TheBallEKE ekeContext, bool isAsync = false)
            {
                EKEContext = ekeContext;
                AlicesActions = new NegotiationAction[]
                    {
                        Alice1_1_GenerateKeyPair, Alice1_2_EncryptPublicKeyWithS, Alice1_3_SendEncryptedPublicKeyToBob,

                        Alice3_0_GetEncryptedSessionKeyFromBob, Alice3_1_DecryptSessionKey,
                        Alice3_2_GenerateAliceRandomValue,
                        Alice3_3_EncryptAliceRandomValueWithSessionKey, Alice3_4_SendEncryptedAliceRandomToBob,

                        Alice5_0_GetAlicesRandomWithBobsRandomEncryptedFromBob, Alice5_1_DecryptBothRandoms,
                        Alice5_2_VerifyAliceRandomInCombinedRandom,
                        Alice5_3_ExtractBobsRandom, Alice5_4_EncryptBobsRandom, Alice5_5_SendEncryptedBobsRandomToBob,

                        AliceX_DoneWithEKE
                    };
                AlicesActionsAsync = new NegotiationActionAsync[]
                    {
                        Alice1_1_GenerateKeyPairAsync, Alice1_2_EncryptPublicKeyWithSAsync, Alice1_3_SendEncryptedPublicKeyToBobAsync,

                        Alice3_0_GetEncryptedSessionKeyFromBobAsync, Alice3_1_DecryptSessionKeyAsync,
                        Alice3_2_GenerateAliceRandomValueAsync,
                        Alice3_3_EncryptAliceRandomValueWithSessionKeyAsync, Alice3_4_SendEncryptedAliceRandomToBobAsync,

                        Alice5_0_GetAlicesRandomWithBobsRandomEncryptedFromBobAsync, Alice5_1_DecryptBothRandomsAsync,
                        Alice5_2_VerifyAliceRandomInCombinedRandomAsync,
                        Alice5_3_ExtractBobsRandomAsync, Alice5_4_EncryptBobsRandomAsync, Alice5_5_SendEncryptedBobsRandomToBobAsync,

                        AliceX_DoneWithEKEAsync
                    };
                CurrentActionIndex = 0;
                WaitForOtherParty = false;
                IsAsync = isAsync;
            }
Ejemplo n.º 3
0
            public EKEAlice(TheBallEKE ekeContext)
            {
                EKEContext    = ekeContext;
                AlicesActions = new NegotiationAction[]
                {
                    Alice1_1_GenerateKeyPair, Alice1_2_EncryptPublicKeyWithS, Alice1_3_SendEncryptedPublicKeyToBob,

                    Alice3_0_GetEncryptedSessionKeyFromBob, Alice3_1_DecryptSessionKey,
                    Alice3_2_GenerateAliceRandomValue,
                    Alice3_3_EncryptAliceRandomValueWithSessionKey, Alice3_4_SendEncryptedAliceRandomToBob,

                    Alice5_0_GetAlicesRandomWithBobsRandomEncryptedFromBob, Alice5_1_DecryptBothRandoms,
                    Alice5_2_VerifyAliceRandomInCombinedRandom,
                    Alice5_3_ExtractBobsRandom, Alice5_4_EncryptBobsRandom, Alice5_5_SendEncryptedBobsRandomToBob,

                    AliceX_DoneWithEKE
                };
            }