Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(23)  |  Call(23)  |  Derive(0)  |  Import(0)

src/o/p/OpenPGP-0.2.3/src/openpgp/sap/pkt/PublicKey.py   OpenPGP(Download)
            # resolve MPIs
            if self.alg in [ASYM_RSA_EOS, ASYM_RSA_E, ASYM_RSA_S]:
                self.RSA_n, idx = MPI.strcalc_mpi(d[idx:], idx)
                self.RSA_e, idx = MPI.strcalc_mpi(d[idx:], idx)
                self._mpi_d = self.RSA_n._d + self.RSA_e._d
            elif ASYM_DSA == self.alg:
                self.DSA_p, idx = MPI.strcalc_mpi(d[idx:], idx)
                self.DSA_q, idx = MPI.strcalc_mpi(d[idx:], idx)
                self.DSA_g, idx = MPI.strcalc_mpi(d[idx:], idx)

src/o/p/OpenPGP-0.2.3/src/openpgp/sap/pkt/SecretKey.py   OpenPGP(Download)
    def __resolve_secmpi(self, idx):
        d = self._d
        # 1:RSA (Encrypt or Sign), 2:RSA Encrypt-Only, 3:RSA Sign-Only
        if self.alg in [1, 2, 3]:
            self.RSA_d, idx = MPI.strcalc_mpi(d[idx:], idx)
            self.RSA_p, idx = MPI.strcalc_mpi(d[idx:], idx)
            self.RSA_q, idx = MPI.strcalc_mpi(d[idx:], idx)
            self.RSA_u, idx = MPI.strcalc_mpi(d[idx:], idx)
        # 17:DSA (Digital Signature Algorithm)
        elif 17 == self.alg:
            self.DSA_x, idx = MPI.strcalc_mpi(d[idx:], idx)
            self._secmpi_d = self.DSA_x._d
        # 16:Elgamal (Encrypt-Only), 20:Elgamal (Encrypt or Sign)

src/o/p/OpenPGP-0.2.3/src/openpgp/sap/pkt/Signature.py   OpenPGP(Download)
 
        if self.alg_pubkey in [ASYM_RSA_S, ASYM_RSA_EOS]:
            self.RSA, idx = MPI.strcalc_mpi(d[idx:], idx)
 
        elif ASYM_DSA == self.alg_pubkey:
            self.DSA_r, idx = MPI.strcalc_mpi(d[idx:], idx)
            self.DSA_s, idx = MPI.strcalc_mpi(d[idx:], idx)
 
        elif self.alg_pubkey in [ASYM_ELGAMAL_EOS]:
            self.ELGAMAL_a, idx = MPI.strcalc_mpi(d[idx:], idx)
        elif self.alg_pubkey in [ASYM_ELGAMAL_EOS]:
            self.ELGAMAL_a, idx = MPI.strcalc_mpi(d[idx:], idx)
            self.ELGAMAL_b, idx = MPI.strcalc_mpi(d[idx:], idx)
 
        else:

src/o/p/OpenPGP-0.2.3/src/openpgp/sap/pkt/PublicKeyEncryptedSessionKey.py   OpenPGP(Download)
 
        if self.alg_pubkey in [ASYM_RSA_EOS, ASYM_RSA_E, ASYM_RSA_S]:
            self.RSA_me_modn, idx = MPI.strcalc_mpi(d[idx:], idx)
 
        elif ASYM_ELGAMAL_E == self.alg_pubkey:
            self.ELGAMAL_gk_modp, idx = MPI.strcalc_mpi(d[idx:], idx)
            self.ELGAMAL_myk_modp, idx = MPI.strcalc_mpi(d[idx:], idx)