︠6812a6b0-e986-430b-adeb-060428b504dci︠
%html
# Initial Segment Attack

︡ee30688f-579b-4da6-9f4f-710ee4603e7f︡{"done":true,"html":"# Initial Segment Attack

"}
︠c29ed099-f19c-40e4-81bc-3f83a72257b6i︠
%md
**Description.** This attack works if one of the primes has a lot of sequential zeros for digits base 10 and the other prime used is smaller than the ammount of zeros used. The consept of the attack is to divy up the sub numbers digit by digit and check if the gcd of that subnumber and the modulus is greater than 1.
︡67a4f801-bca7-4a53-b3d1-964bb676aa91︡{"done":true,"md":"**Description.** This attack works if one of the primes has a lot of sequential zeros for digits base 10 and the other prime used is smaller than the ammount of zeros used. The consept of the attack is to divy up the sub numbers digit by digit and check if the gcd of that subnumber and the modulus is greater than 1."}
︠b347f093-a222-48eb-8d8e-2d12c4688550s︠
###########################################################################################################
# The ISAttack function will attempt to return a factor of the composite number entered in as an argument #
# The attack could be successful is one of the prime has many sequental zeros as digits #
###########################################################################################################
def ISAttack (R):
R = ZZ(R)
n = R.ndigits()
#n = len(R)
for j in range(1, n + 1):
x=(R-(R % 10^j))/10^j
p = gcd(x, R)
if ((1 < p)and (p