Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6944247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:16:59+00:00 2026-05-27T13:16:59+00:00

I face the following problem in a cryptographical application: I have given a set

  • 0

I face the following problem in a cryptographical application: I have given a set of linear congruences

a[1]*x[1]+a[2]*x[2]+a[3]*x[3] == d[1] (mod p)
b[1]*x[1]+b[2]*x[2]+b[3]*x[3] == d[2] (mod p)
c[1]*x[1]+c[2]*x[2]+c[3]*x[3] == d[3] (mod p)

Here, x is unknown an a,b,c,d are given

The system is most likely underdetermined, so I have a large solution space. I need an algorithm that finds an equidistributed solution (that means equidistributed in the solution space) to that problem using a pseudo-random number generator (or fails).

Most standard algorithms for linear equation systems that I know from my linear algebra courses are not directly applicable to congruences as far as I can see…

My current, “safe” algorithm works as follows: Find all variable that appear in only one equation, and assign a random value. Now if in each row, only one variable is unassigned, assign the value according to the congruence. Otherwise fail.

Can anyone give me a clue how to solve this problem in general?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:16:59+00:00Added an answer on May 27, 2026 at 1:16 pm

    You can use gaussian elimination and similar algorithms just like you learned in your linear algebra courses, but all arithmetic is performed mod p (p is a prime). The one important difference is in the definition of “division”: to compute a / b you instead compute a * (1/b) (in words, “a times b inverse”). Consider the following changes to the math operations normally used

    • addition: a+b becomes a+b mod p
    • subtraction: a-b becomes a-b mod p
    • multiplication: a*b becomes a*b mod p
    • division: a/b becomes: if p divides b, then “error: divide by zero”, else a * (1/b) mod p

    To compute the inverse of b mod p you can use the extended euclidean algorithm or alternatively compute b**(p-2) mod p.

    Rather than trying to roll this yourself, look for an existing library or package. I think maybe Sage can do this, and certainly Mathematica, and Maple, and similar commercial math tools can.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem. Consider the classes class face { virtual std::vector<ptr>& get_vertices(void)
I face the following problem function book($memberid, $classid){ if (!book){ // update the db
I face following problem with three20 photobrowser app : 1: Some time images are
I face a problem in scipy 'leastsq' optimisation routine, if i execute the following
I face the following strange problem while using JFileChooser package sandbox; import java.io.File; import
i face the following problem, when opening a delegate window, for example to upload
Q: I face the following problem two weeks ago , and i don't know
I just have started to program with java rmi and I face the following
I often run in the following problem, I have a web page with the
If .emacs contains the following two lines (set-face-foreground 'modeline #000000) (set-face-background 'modeline #00FFFF) then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.