예제 #1
0
        public KRB_AP_REP(Key key, DateTime timestamp)
        {
            // TODO: timestamp+1
            /// ...
            ///

            this.encrypted = DesEncryption.EncryptObject(timestamp, key);
        }
예제 #2
0
        public KRB_AS_REP(Key k_a, Key ks_a, Tgt tgt)
        {
            KRB_AS_REP_NoEncrypted noEncrypt = new KRB_AS_REP_NoEncrypted();

            noEncrypt.ks_a = ks_a;
            noEncrypt.tgt  = tgt;

            this.encrypted = DesEncryption.EncryptObject(noEncrypt, k_a);
        }
예제 #3
0
        public Ticket(Key key, User from, Key shareKeys)
        {
            Ticket_NoEncrypted tne = new Ticket_NoEncrypted();

            tne.from      = from;
            tne.shareKeys = shareKeys;

            this.encrypted = DesEncryption.EncryptObject(tne, key);
        }
예제 #4
0
        public Tgt(Key k_kdc, User u, Key ks_a)
        {
            TgtNoEncrypted tgtNoEncrypted = new TgtNoEncrypted();

            tgtNoEncrypted.u    = u;
            tgtNoEncrypted.ks_a = ks_a;

            this.encrypted = DesEncryption.EncryptObject(tgtNoEncrypted, k_kdc);
        }
예제 #5
0
        public KRB_TGS_REP(Key key, User reqUser, Key k_ab, Ticket ticket)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = new KRB_TGS_REP_NoEncrypted();

            noEncrypt.reqUser = reqUser;
            noEncrypt.k_ab    = k_ab;
            noEncrypt.ticket  = ticket;

            this.encrypted = DesEncryption.EncryptObject(noEncrypt, key);
        }
예제 #6
0
        public Key GetShareKeys(Key key)
        {
            Ticket_NoEncrypted ticket_noEncrypted = (Ticket_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(ticket_noEncrypted.shareKeys);
        }
예제 #7
0
        public User GetFrom(Key key)
        {
            Ticket_NoEncrypted ticket_noEncrypted = (Ticket_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(ticket_noEncrypted.from);
        }
예제 #8
0
        public Authenticator(Key key)
        {
            DateTime now = DateTime.Now;

            this.encrypted = DesEncryption.EncryptObject(now, key);
        }
예제 #9
0
 public DateTime GetTimestamp(Key key)
 {
     return((DateTime)DesEncryption.DecryptObject(this.encrypted, key));
 }
예제 #10
0
        public User GetUser(Key key)
        {
            TgtNoEncrypted noEncrypt = (TgtNoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.u);
        }
예제 #11
0
        public Ticket GetTicket(Key key)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = (KRB_TGS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.ticket);
        }
예제 #12
0
        public Key GetK_AB(Key key)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = (KRB_TGS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.k_ab);
        }
예제 #13
0
        public User GetReqUser(Key key)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = (KRB_TGS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.reqUser);
        }
예제 #14
0
        public Key GetKS_A(Key key)
        {
            KRB_AS_REP_NoEncrypted noEncrypt = (KRB_AS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.ks_a);
        }
예제 #15
0
        public Key GetKS_A(Key key)
        {
            TgtNoEncrypted noEncrypt = (TgtNoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.ks_a);
        }
예제 #16
0
        public Tgt GetTGT(Key key)
        {
            KRB_AS_REP_NoEncrypted noEncrypt = (KRB_AS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.tgt);
        }
예제 #17
0
        public DateTime GetTimeStamp(Key key)
        {
            DateTime timestamp = (DateTime)DesEncryption.DecryptObject(this.encrypted, key);

            return(timestamp);
        }