Skip to content

Commit 7e62403

Browse files
authored
Merge pull request #312 from dmur1/make-rsa-command-report-factors-always-#304
make the rsa command report factors always
2 parents d3a9b1f + 8df2e28 commit 7e62403

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

rsa/factor_with_ecm.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ func factorWithECM(strategy *Strategy, n *big.Int) {
7676
return
7777
}
7878

79+
fmt.Printf("["+theme.ColorGreen+"%s"+theme.ColorReset+"] "+theme.ColorPurple+"%v"+theme.ColorReset+"\n", strategy.Name, factors)
80+
7981
if len(factors) == 2 {
8082
// special case for N = p * q where p and q and two distinct primes
8183
p := factors[0]

rsa/factor_with_pari.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ func factorWithPari(strategy *Strategy, n *big.Int) {
7676
return
7777
}
7878

79+
fmt.Printf("["+theme.ColorGreen+"%s"+theme.ColorReset+"] "+theme.ColorPurple+"%v"+theme.ColorReset+"\n", strategy.Name, factors)
80+
7981
if len(factors) == 2 {
8082
// special case for N = p * q where p and q and two distinct primes
8183
p := factors[0]

rsa/factordb.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ func factorDB(strategy *Strategy, n *big.Int) {
7575
log.Fatalf("💥 "+theme.ColorRed+"error"+theme.ColorReset+": %v\n", err)
7676
}
7777

78+
fmt.Printf("["+theme.ColorGreen+"%s"+theme.ColorReset+"] "+theme.ColorPurple+"%v"+theme.ColorReset+"\n", strategy.Name, factors)
79+
7880
if len(factors) == 2 {
7981
// special case for N = p * q where p and q and two distinct primes
8082
p := factors[0]

rsa/rsa.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func ResultChecker(strategy *Strategy, m *big.Int) []byte {
5353
now := time.Now()
5454
diff := now.Sub(StartTime)
5555

56-
fmt.Printf("["+theme.ColorGreen+"%s"+theme.ColorReset+"] after %v\n🏁 "+theme.ColorPurple+"%s"+theme.ColorReset+"\n", strategy.Name, diff, mBytes)
56+
fmt.Printf("["+theme.ColorGreen+"%s"+theme.ColorReset+"] after %v 🏁 "+theme.ColorPurple+"%s"+theme.ColorReset+"\n", strategy.Name, diff, mBytes)
5757
return mBytes
5858
}
5959

0 commit comments

Comments
 (0)