SRP6 Java Implementation

I was wondering if anyone knew how to implement the SRP6 protocol in Java. I know there's an impl of it in gnu-crypto, but i don't need all the extra stuff. I've been trying various combination's and none of them have worked. I'm comparing my results with the results from http://srp.stanford.edu/demo/demo.html , which i'm assuming are correct, due to the fact that it's written by the creator of the SRP protocol, I mean, I suppose it could be wrong, but then the site wouldn't be very effective then.
My biggest problem seems to be when hashing the salt with the hashed username and password.
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
BigInteger salt = new BigInteger(random.generateSeed(32));
BigInteger innerHash = new BigInteger(SHA1.hash("zymus:apocalypse"));//According to many tested SHA1 impl's, this works correctly.
byte[] exp = new String(SHA1.hash(salt.toString(16) + innerHash.toString(16))).getBytes("UTF-8");;//This is where i believe I'm messing up. This is just one of the many combination's that i've tried.
System.out.println(salt.toString(16));
System.out.println(new BigInteger(exp).toString(16));Output:
>
8098f80df83b4f23d3f104acac3f6f165ae059ebe00966d1c3339afb37fe78c
20476ec2a3c2a9c2ad2ac3984f010769c3bec3b6e282ac11155fc2a71f
>
Expected output according to aforementioned site:
>
8098f80df83b4f23d3f104acac3f6f165ae059ebe00966d1c3339afb37fe78c
ffd90619e047303e3278be09314664b3557c89d5
>
As you can see, the hashed salt + pass doesn't compare. The protocol definition for hashing is:
x = SHA1(salt + SHA1(username + ":" + password));Any ideas?
Edited by: Zymus on Sep 3, 2010 7:20 AM
Edited by: Zymus on Sep 3, 2010 7:21 AM

check out this site www.sourceforge.net. There are a lot of free , opensource projects available for download. Try and search there. I am sure you'll get one.

Similar Messages

  • Creating Web Services using Java Implementation

    Hi,
    This is quite a general question on how to create a Web Service using Java Implementation that needs to conform to a client XML schema.
    Here are my Version specs,
    I am using Jdeveloper 10.1.3.4.0 and deploying onto OAS 10.1.3.
    I will be creating a J2ee 1.4 (JAX-RPC) Web Service using Document/Wrapped style.
    I have been provided an XML schema from the client which is quite complex.
    Using a top-down approach, I can create my WSDL file and import the XML Schema for my type definitions.
    The Web service aim is to accept some parameters and return some data from the Oracle Database. The
    XML response from the web service must conform to the element, attribute definitions in the provided XML schema.
    From a Java implementation approach, what is the best (simplest or quickest) way to retrieve data from the Oracle
    tables and map each fields/column to the required XML output (defined in the XML schema).
    I'm not too concerned with using Java to retrieve data from the Database, more with how I can map the data returned
    to the required output. Can this mapping task be controlled within the Java program?
    Thanks in advance.

    Hi,
    This is quite a general question on how to create a Web Service using Java Implementation that needs to conform to a client XML schema.
    Here are my Version specs,
    I am using Jdeveloper 10.1.3.4.0 and deploying onto OAS 10.1.3.
    I will be creating a J2ee 1.4 (JAX-RPC) Web Service using Document/Wrapped style.
    I have been provided an XML schema from the client which is quite complex.
    Using a top-down approach, I can create my WSDL file and import the XML Schema for my type definitions.
    The Web service aim is to accept some parameters and return some data from the Oracle Database. The
    XML response from the web service must conform to the element, attribute definitions in the provided XML schema.
    From a Java implementation approach, what is the best (simplest or quickest) way to retrieve data from the Oracle
    tables and map each fields/column to the required XML output (defined in the XML schema).
    I'm not too concerned with using Java to retrieve data from the Database, more with how I can map the data returned
    to the required output. Can this mapping task be controlled within the Java program?
    Thanks in advance.

  • Java implementation from WSDL file

    Hello All
    I am working on my thesis and have to deal with web services. I have a WSDL file where I have to create the Java implementation for and deploy it to TomCat which is comming with JWSDP1.3.
    The steps I do are as follow:
    1. Get the WSDL file
    2. Create the config.xml file
    3. run wscompile with "-import" option
    4. implement service implementation (provider interface)
    5. run wsdeploy tool
    All tools are running successfully without exception. When I try to access the webservice I receive the following message from tomcat:
    "No JAX-RPC context information available."
    and I cannot access the webservice from my client program. The "hello" example works with my setup.
    Below, please find my WSDL file and my config file as well as my provider interface implementation.
    Thanks for your help.
    ===========
    calculatesqrt1.wsdl:
    <definitions xmlns:tns="http://localhost:8080/calculatesqrt1-jaxrpc1/ws/calcultesqrt1.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://localhost:8080/calculatesqrt1-jaxrpc1/ws/calcultesqrt1.wsdl" name="Calculatesqrt1">
         <types/>
         <message name="CalculatesqrtProvider1_sqrt">
              <part name="double_1" type="xsd:double"/>
         </message>
         <message name="CalculatesqrtProvider1_sqrtResponse">
              <part name="result" type="xsd:double"/>
         </message>
         <portType name="CalculatesqrtProvider1">
              <operation name="sqrt" parameterOrder="double_1">
                   <input message="tns:CalculatesqrtProvider1_sqrt"/>
                   <output message="tns:CalculatesqrtProvider1_sqrtResponse"/>
              </operation>
         </portType>
         <binding name="CalculatesqrtProvider1Binding" type="tns:CalculatesqrtProvider1">
              <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="sqrt">
                   <input>
                        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/calculatesqrt1-jaxrpc1/ws/calculatesqrt1.wsdl"/>
                   </input>
                   <output>
                        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/calculatesqrt1-jaxrpc1/ws/calculatesqrt1.wsdl"/>
                   </output>
                   <soap:operation/>
              </operation>
         </binding>
         <service name="Calculatesqrt1">
              <port name="CalculatesqrtProvider1Port" binding="tns:CalculatesqrtProvider1Binding">
                   <soap:address location="http://localhost:8080/calculatesqrt1-jaxrpc1/ws/calcultesqrt1"/>
              </port>
         </service>
    </definitions>
    ===========
    config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
         <wsdl location="Calculatesqrt1.wsdl" packageName="calcusqrt1">
         </wsdl>
    </configuration>
    ============
    CalculatesqrtServiceImpl1.java:
    package calcusqrt1;
    public class CalculatesqrtServiceImpl1 implements calcusqrt1.CalculatesqrtProvider1 {
      public double sqrt(double double0) {
        return Math.sqrt(double0);

    Please post future JAXRPC related questions to [email protected]
    Sounds like it did not get deployed properly on the web server. You should be able to hit the URL for the
    web service in a web browser to get an information.
    The client will use the address stored in the WSDL to access the webservice, please make sure that it is correct. If you download the WSDL from the deployed service the address should be fixed up for you.

  • Newbie: IBM Directory Server LDAP Java Implementation

    Good day friends,
    I'm new in developing LDAP applications. I'm using IBM Directory Server v4.1 & need to develop a application (a web application - JSP/Servlet/EJB). I'm doing this as part of a Web project where i need to store the User Info of the registering user to LDAP server with proper Organisational Hierarchy & Privileges. I'm using Java for this application. I have the proper JNDI environment set for LDAP interaction. Can anyone provide me with a best practice/right procedure for implementing this, like searching for an entry, inserting/updating an entry & how to make use of Attributes provided in IBM DS 4.1.
    I searched IBM redbook & others for this but without any success. All Prog references are pertaining to C & very minimal info for Java implementation. I found some info in other LDAP like Netscape & Novell, but there structuring is different from IBM DS. I would appreciate if anyone can throw some light on this regard. I would appreciate a complete Java Programmers Reference Guide for IBM Directory Server v4.1.
    Thanking u in anticipation.
    cheers,
    J2EEDev.

    I'm coping with the same question as you had.
    Did you get any valuable information or a Java programmers reference guide for IBM directory server ?
    If so, could you send me an url where I can obtain the required information ?
    Thanks for your reply !
    Dirk

  • How to call java implementations from C language

    How to call java implementations from C language....
    I know using JNI java can call C code....is the converse also possible????
    -Rams

    How to call java implementations from C language....
    I know using JNI java can call C code....is the
    converse also possible????Yes.

  • Trying to Find Sample Java Implementation for GATE Information Extractor

    I would like to semantically index a large repository of unstructured documents (over a million) using a GATE
    Information Extractor, as described in chapter 4 of the Oracle
    Semantic Technologies Developers Guide 11g Release 2 (E11828-08).
    Page 4-11 states:
    "A sample Java implementation for the GATE listener is available for
    download from the code samples and examples page on OTN (see Section
    1.10, "Semantic Data Examples (PL/SQL and Java)" for information about
    this page)."
    I followed the link and downloaded the sample code, but I can't seem
    to identify any GATE code inside it, or any installation instructions
    for the GATE Information Extractor. Are you familiar with it? Any
    guidance would be appreciated.

    You are openning a direct connection to the DB. A Java Applet is restricted in what it is allowed to do, and it can only open connections to the machine it was downloaded from.
    If you are running the .html file straight from the File System, try downloading the applet from a webserver running on the same machine as the DB.
    This should solve your problem.
    Regards,
    Manuel Amago.

  • How does java implements runtime polymorphism.?

    Hi all.
    we know how does runtime polymorphism take place in java.
    But my quesions is , how does java implement it internally.
    in C++, with the use of keyword virtual , complier decides to make a call at runtime using virtual table and Vptr.
    like in c++,
    class base {
    public:
    virtual void show(){
    cout<<"I am in base class"<<endl;
    class child : public base {
    public:
    void show(){
    cout<<" I am in child class"<<endl;
    int main(){
    base*p = new child();
    p->show();
    return 0;
    out put - I am in child class.
    but if we remove the virtual keyword then output
    I am in base class..
    We know how it happens
    but in java
    class base {
    void show(){
    System.out.println("I am in base class");
    class child extends base {
    void show(){
    System.out.println(" I am in child class");
    class demo {
    public static void main(string args[ ]){
    base b;
    child c = new child();
    b = c;
    b.show();
    output is - I am in child class
    but how can i bring the output as
    I am in base class ---
    complier knows that b is base reference so y doesnt it just use base version.

    if all methods are virtual..then we should always have runtime binding but we do have early biding too.
    shouldnt we able to call base verison using a base reference variable like in c++.
    May be I m mixing big times java n c++. But it seems to me as core java is much like c++ . The things u can do in c++ , u can do same in java in different ways.

  • Java implementation of rsync protocoll

    Hi,
    has anyone heard of a java implementation of the rsync protokoll other than the inactive "JarSync" Project on SourceForge?
    Or is there anything that compares to rsync that has been implemented in java?
    --- carco

    check out this site www.sourceforge.net. There are a lot of free , opensource projects available for download. Try and search there. I am sure you'll get one.

  • When did Java implement --- java.util.Collection

    In what year and release date did Java implement java.util.Collection ?
    classes:
    ArrayList (Java 2), LinkedList (Java 2), Arrays (Java 2), TreeMap (Java 2),
    TreeSet (Java 2)
    interfaces:
    Collection (Java 2), List (Java 2), ListIterator (Java 2),
    Comparator (Java 2), Set (Java 2), Map (Java 2), Iterator (Java 2)
    Edited by: SadaYama on Sep 24, 2008 6:45 PM

    Encephalopathic wrote:
    tsith wrote:
    There's a reason this didn't work out for you last time you asked this...Shame on you for mentioning a great thread without providing a link. I will make up for this egregious deficiency here and now:
    [http://forums.sun.com/thread.jspa?threadID=5334215]
    Most appreciated, guv - please accept my apologies for the oversight.

  • Java implementation of web service concept

    I am so confused. What exactly is the Java implementation of web service concept? SOAP, J2EE, JSP+Servlets+beans or what?

    For an excellent description of webservices in Java read the following article
    http://www.theserverside.com/resources/article.jsp?l=WebServices-Dev-Guide
    It should clear most of your doubts.
    Web services means a client server program which exhanges data in XML over HTTP.
    Soap is one way of implementing web services. A java soap implementation is freely available at
    http://xml.apache.org/soap/index.html
    Also, you can read about ebXML (which is another model for making web services).
    http://www.xml.org/feature_articles/2000_1107_miller.shtml
    http://java.sun.com/features/2001/09/ebxmlrev.html
    hope this helps.
    regards,
    Abhishek.

  • PL/SQL and Java implementation

    Hi all,
    We need to implement a fast solution for reporting to our existing web application. Application is totally based on stored procedures written in PL/SQL.
    We have already java classes for drawing different types of charts
    named Chartdirector (http://www.advsofteng.com/)
    This library can create chart images in memory.
    I have already read about calling java classes from PL/SQL and SQLJ too.
    My questions are;
    1. Is this safe to include classes to database and create
    reports by using loadjava in real life. I mean not in theory, in real life?
    2. Is there any experiments of the audience about this method?
    3. Would it be any performance problems about this?
    4. Should i prefer to use any Java container and jsps instead of this method?
    I will continue to research for necessary steps after i could see the light :)
    Thank you to all,
    Regards,
    Gokhan

    > 1. Is this safe to include classes to database and create
    reports by using loadjava in real life. I mean not in theory, in real life?
    Yes.
    > 2. Is there any experiments of the audience about this method?
    Experiments and actual implementation - yes. It works. Granted, it does not always work as easy as running the Java code from the command line. But it does work.
    > 3. Would it be any performance problems about this?
    This is a potential problem with any software code.
    4. Should i prefer to use any Java container and jsps instead of this method?
    To be honest, I prefer not using Java for web graphics as I'm not impressed with the quality and flexibility of the graphs generated. I prefer using (and paying for commercial use) for the JPGraph classes for PHP - and using that from PL/SQL (via Zend Core for Oracle).
    Another option is to use SVG and generated SVG directly from PL/SQL. But this requires a browser plugin and SVG also does not look that great. (this is btw what Oracle's HTMLDB does and uses)

  • Need help! Algorithm java implementation

    Hi,
    I am trying to make a simple java program based on an algorithm which will print out all the odd numbers in a stack. But first it should put all the numbers into an auxiliary stack from the original stack but in reverse order. Then the algorithm should put the odd numbers into the new stack (copystack)
    Algorithm
    To obtain a stack containing only the elements in Stack thisStack which are at odd depth
    where thisStack has depth depth
    1. Let copyStack and sAux be empty ArrayStacks
    2. Let size be equal to depth
    3. Repeat size times
    3.1 Let elem be the Object returned by popping thisStack
    3.2 Push elem into sAux.
    4. Let oddPosition = 1 ? size modulo 2.
    5. Repeat from numReps = 0 to numReps = size - 1
    5.1 Let elem be the result of popping sAux
    5.2 Push elem into thisStack
    5.2 if numReps mod 2 equals oddPosition
    5.3.1 Push elem into copyStack
    6. Terminate with answer copyStack
    Use the ?push? (i.e. void addLast(Object)) and ?pop? (i.e. Object removeLast()) methods already available
    from class ArrayStack to implement the new method as follows: Take all the elements, one at a time, from the
    original stack into an auxiliary stack. The auxiliary stack now contains the same elements as the original stack,
    but in reverse order. Take the elements from the auxiliary stack onto both the original stack and the new (copy)
    stack if appropriate

    Indeed. It's much less likely he'd double-post too.
    http://forum.java.sun.com/thread.jspa?threadID=5278338&tstart=0

  • JAVA implementation Class in Forms 9i

    I have a Form where i'm using the progressbarJPC from de Oracle Forms90 demo's.
    To get this work I have to modify the Formsweb.cfg with progressbar.jar. That works.
    In developer there's an entrie implementation Class on the bean where i have to write "oracle.forms.demos.ProgressBarPJC"
    Thats also working. Now my question.
    I develop on W2000 and deploy on Linux with AS9i.
    To getting forms work on Linux i have to compile the code again.
    On linux there are no folders containing the OracleForms demo's.
    How can ik deploy that kind of classes on Linux?
    Do I have to compile the source again on linux in de folder forms90/java. What to do with the implementation class "oracle.forms.demos.ProgressBarPJC" ?
    Hugo Perfors

    Hugo,
    the Forms module can be compiled without having to compile oracle.forms.demos.ProgressBarPJC. Just have the implementation class reference in teh Forms module and use the same jar file.
    Frank

  • Java implementation of powertypes

    Hello,
    I am currently working on UML and I would like to know how powertypes are implemented in java. Can anyone please post some java snippets or throw some light on the subject?
    Thanks in advance,
    Julien Martin.

    So then we don't work together for the OP? (2 good to
    B true? :-D)
    A power type is an object type whose instances are
    subtypes of another object typeYes a definition - not an implementation.
    >
    Vocabulary-wise:
    For JO, it's object type. For Booch it's a class, and
    Rumbaugh, it's a class.
    For JO, it's generalization. For Booch it's
    inheritance, and Rumbaugh, it's generalization.
    As far as I know none of the above are languages. They are design methodologies.
    I believe in normal usage "implementation" means how one codes it in a language. Thus for example an association can be coded either as a reference (java) or as a link class.
    So
    Version 1:
    public abstract class Account {
    public class CheckingAccount extends Account{
    OR Version 2:
    public interface Account {
    public class CheckingAccount implements Account{
    }Could be. But I was under the impression that powertypes have attributes. And none of these examples have attributes.

  • Java implementation of nsupdate

    Hi,
    I have several machines connected to the internet each having their own dynamic public IP via their ISP. Now I want these machines to connect to my Dynamic DNS server (BIND running on linux) to update their IP addresses in the specified zone records. This works very well with nsupdate.
    The problem however is that I dont have linux running on all my machines. Some of them have windows running on them and I don't want to install some kind of win 32 implementation of nsupdate on them. So I was wondering if any one knows of a java library that does the job of an nsupdate client?
    thx,
    carco

    check out this site www.sourceforge.net. There are a lot of free , opensource projects available for download. Try and search there. I am sure you'll get one.

Maybe you are looking for