• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

not sure whether this thread works or not

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator




i believe my threads are not working well. is there any way to make it work, please. i have been try so many ways but it still end up the same thing. please i dont know what else to do.
 
Sara Brown
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have made the thread at the cipher. but still the performance does not effect much. is there any tips or helps or guide for me making the threads work well?

Thank you for your help.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, please adhere to Java conventions for Class naming.

Other than that, I am not going to wade through and debug your code.

Please let us know how far it gets successfully, and then the failure condition(s).

debug, logging, and at a last resort; System.out.println() are your friends.

WP
 
Sara Brown
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the result for the encryption and decryption whether by using ECB and CBC mode are the same. means that bob and alice retrieve the same secret message.

however, when it comes to the performance, using only 1 thread gives much faster than large number.

I have been reading that we could make it parallel at the cipher but when i look back at my code, i think my algorithm is the same way of sequential one thus it does not make it faster but slowest.

I dont know what else to put to make my thread works. i have been working on plenty of design but it still works the same way. above code is my last code i have been modified.

i have no idea to make it parallel. please, i really need help design this algorithm.

is there any potential place to put the thread other than at the cipher?
 
Sara Brown
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what i do. after we know that alice and bob shared the same secret message, i pass it to a new thread as below.



then it will run back at the run method which is the overide. what i do in the run method is this.



which it will pass to a new method called goKey. and in the goKey() i put it this way.



the goKey() will identify whether it will generate the key or do the encrypt. if the count is 1 then it will pass to new method. and that method will do the cipher.



this cipher will do in two different modes which are in ECB and CBC.



this to make it more clear about what i do in the above code.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic