Android Open Source - CipherChat Nonce Packet






From Project

Back to project page CipherChat.

License

The source code is released under:

MIT License

If you think the Android project CipherChat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.desperate.common;
/* w  ww .  jav  a2s. c  om*/
import java.io.Serializable;

import javax.crypto.spec.SecretKeySpec;

/**
 * Packet created by the B entity in the second message of the Needham-Shroeder-revisited protocol. In message 7, B will receive this again, with the
 * new Session Key inside, and verify the nonce it sent before is the same.
 * 
 * @author SIRS-RAR
 * 
 */
public class NoncePacket implements Serializable {

  private static final long serialVersionUID = 4643248173148359568L;

  /** Name of A */
  public String requesterUserName;

  /** Nonce created by B for freshness of the chat session request */
  public Long bNonce;

  /**
   * Session key to be used in the session. Null when B created the packet. Contains the key when A returns the packet after getting the key from
   * the KDC.
   */
  public SecretKeySpec sessionKey = null;

  /**
   * Creates the nonce to be used in message 2.
   * 
   * @param requestedUserName
   *            Name of A
   * @param bNonce
   *            Random unique number to be used for freshnes
   */
  public NoncePacket(String requestedUserName, Long bNonce) {
    this.requesterUserName = requestedUserName;
    this.bNonce = bNonce;
  }

}




Java Source Code List

com.desperate.AdminConsole.java
com.desperate.ClientHandler.java
com.desperate.CryptoServer.java
com.desperate.UserDatabase.java
com.desperate.User.java
com.desperate.common.Message.java
com.desperate.common.NoncePacket.java
com.desperate.common.SessionKeyRequestInfo.java
com.desperate.common.TestCipherSerializable.java
com.desperate.common.Utilities.java
com.desperate.common.messages.ChatMessage.java
com.desperate.common.messages.IPMessage.java
com.desperate.common.messages.LoginMessage.java
com.desperate.common.messages.LogoutMessage.java
com.desperate.common.messages.RegisterMessage.java
com.desperate.common.messages.SessionKeyRequestMessage.java
com.desperate.common.messages.StartChatMessage.java
com.desperate.common.messages.UserListMessage.java
com.desperate.common.replies.CheckSessionMessage.java
com.desperate.common.replies.IPReplyMessage.java
com.desperate.common.replies.LoginReplyMessage.java
com.desperate.common.replies.LogoutReplyMessage.java
com.desperate.common.replies.NeedhamSchroederSuccessReply.java
com.desperate.common.replies.RegisterReplyMessage.java
com.desperate.common.replies.ReplyMessage.java
com.desperate.common.replies.SessionKeyReplyMessage.java
com.desperate.common.replies.StartChatReply.java
com.desperate.common.replies.UserListReplyMessage.java
com.desperate.debug.DebugClient.java
com.desperate.debug.DebugCryptoClient.java
com.desperate.debug.PlainServer.java
com.ist.cipherchat.gui.ChatActivity.java
com.ist.cipherchat.gui.ChooseServerActivity.java
com.ist.cipherchat.gui.Contacts.java
com.ist.cipherchat.gui.Origin.java
com.ist.cipherchat.networking.ChatActivityRunnable.java
com.ist.cipherchat.networking.ChatInRunnable.java
com.ist.cipherchat.networking.ChatOutHandler.java
com.ist.cipherchat.networking.Core.java
com.ist.cipherchat.networking.Globals.java
com.ist.cipherchat.networking.OutputSocketHandler.java
com.ist.cipherchat.networking.PhoneServerSocketHandler.java
com.ist.cipherchat.networking.ThreadComm.java