Win a copy of Spring Boot in Practice this week in the Spring forum!

Kasparov Patel

Ranch Hand
+ Follow
since Jan 23, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kasparov Patel

Hello Friends,

Please find my code as follow:


I am just trying to implement decorator pattern, but I am not getting how can I get method.

I would appreciate if any one can help me.

Thanking You,
Kasparov
8 years ago
Hello Richard,

Thanks for your reply. I got the solution by self. All I need to do is to create a loop where I am creating string.

Thanking You,

8 years ago

Richard Tookey wrote:I find it interesting that you are using addition of the previous 'toAdd' ciphertext value to the current cleartext value to create Cipher Block Chaining (CBC) to circumvent frequency analysis. I'm not convinced that your implementation of this will create a decodable set of values from just K shares since all N shares seem to be needed in the same order they were generated in order to invert the CBC. I shall have to think about it.!



Thanks for your quick reply. I think it is not CBC because first iteration of inner loop calculates toAdd = (toAdd + (coeff[0] * Math.power(0,0)) % primeNum ) % primeNum and
second time toAdd = (toAdd + (coeff[1] * Math.power(0,1)) % primeNum ) % primeNum. which is equivalent of F(x) = (a0 + a1x + a2x^2) mod p. Please find my full code as follow:
I have problem to generate 5 shared string. Somehow my code giving me 5 string length of 5 characters only. Could you please tell me how can I get string from an array of characters?

8 years ago
Hello Richard,

I have changed my code which is as follow:



I hope now it should not be any problem. I would appreciate if you could tell me that how can I generate string instead of each characters.

Thanking You,
8 years ago

Kasparov Patel wrote:Hello Friends,

Thanks for your reply. I do have some questions. I know I can convert string into byte array and using that value I can create share. But I am not getting how can I convert back from byte array to string to show original string?


Please help me.

Thanking You

8 years ago
Ok thanks.
8 years ago
I have taken references from may places. Some of them are as follow:

1) http://www.youtube.com/watch?v=v6IvxnJHD-o
2) http://en.wikipedia.org/wiki/Shamir's_Secret_Sharing
3) http://www.cap-lore.com/code/shamir.c

It is up to you, whether you want to answer or not.

Thanking You,
8 years ago
Hello Friends,

Thanks for your reply. I do have some questions. I know I can convert string into byte array and using that value I can create share. But I am not getting how can I convert back from byte array to string to show original string?



Please help me.

Thanking You
8 years ago
Hello Friends,

I am trying to do shamir secret sharing of a given text regardless of text length. Can any one explain me, how to supply text to shamir's secret?

Thanking You,

8 years ago
Hello Richard,

Thanks for your valuable suggestion. I will follow it. Thanks once again.
8 years ago
Hello Friends,

I am sorry for that. I have posted my both file so you can understand what I am trying to do. I am using my AES.java file to encrypt calling AES.encrypt() and decrypting using AES.decrypt().
my code is working for encryption but not decryption. I tried to figure out but not succeed. I would appreciate if you could point me where exactly I am doing mistake.

Once again I am sorry for inconvenience if any and thanks for your reply.
8 years ago
Hello,

I am trying to encrypt image considering it as byte data (i.e. without considering the image data structure). and decrypt considering the image structure (image header and image data, etc) using AES. I am able to encrypt, but unfortunatly my decrypt code is not working. Please find my AES.java and GUI.java files as follow:





I would appreciate if anyone can help me.
8 years ago
Thanks for all.
10 years ago
JSP
Hello All,

My directory structure are as follow:

I am not able to access any file in home.jsp. I tried to gave all kind of path in home.jsp such as ./css/logo.jpg, WEB-INF/css/logo.jpg, or ./WEB-INF/css/logo.jpg.

Can anyone help me?

Regards,
Kasparov
10 years ago
JSP
Getting following error

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 32 in the jsp file: /Bean.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
29: </p>
30: <p>
31: <% NextBday bday = new NextBday();%>
32: My Next Birth Day is after <%=bday.service(request.getParameter("dob"))%> days.
33: </p>
34: </body>
35: </html>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:644)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
10 years ago
JSP